vicpenap / PrettyKit

PrettyKit for iOS is a small set of new widgets and UIKit subclasses that gives you a deeper UIKit customization. You will be able to change their background color, add gradients, shadows, etc.
http://vicpenap.github.com/PrettyKit
Other
1.22k stars 154 forks source link

[PrettyTableViewCell] Correctly initialize from a storyboard. #25

Open fabiopelosin opened 12 years ago

fabiopelosin commented 12 years ago

UIStoryboard calls initWithCoder:.

vicpenap commented 12 years ago

That's cool!

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

fabiopelosin commented 12 years ago

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?

vicpenap commented 12 years ago

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 :)

danil-z commented 11 years ago

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