PrettyKit icon indicating copy to clipboard operation
PrettyKit copied to clipboard

[PrettyTableViewCell] Correctly initialize from a storyboard.

Open fabiopelosin opened this issue 13 years ago • 4 comments

UIStoryboard calls initWithCoder:.

fabiopelosin avatar Jul 30 '12 20:07 fabiopelosin

That's cool!

Have you tried the other cells too? They also have initialization code on initWithStyle: method.

vicpenap avatar Jul 31 '12 18:07 vicpenap

I haven't tried the other cells but I think that the same logic applies.

One note, commonInit is often used in this scenario and experienced some difficulties after implemented this change because I was overriding it :-) What do you think about name-spacing it as prettyCommonInit?

fabiopelosin avatar Aug 01 '12 12:08 fabiopelosin

Ok, so the other cells would need to extract the initialization from the constructor and add a new initWithCoder. Could you try that? I'm not familiar with Storyboards, as I've been always giving support to iOS 4 and as a result I've never used it.

It's ok for me to change the common initializer. You can choose prettyCommonInit as suggest. It's your contribution, so feel free :)

vicpenap avatar Aug 01 '12 13:08 vicpenap

I'm affected of this issue too. i've merged this pull request and now custom cells works as expected from storyboards

danil-z avatar Jul 19 '13 14:07 danil-z