Weston
Weston

Reputation: 1491

What method is called when a UITableViewCell is initialized by Interface Builder?

I have a custom UITableViewCell and I need to initialize some ivars before it is displayed in a UITableView. I overrode - (void)init but that did not seem to be the designated initializer. Where should I be putting my code?

EDIT: the cell was made using UITableViewCell prototypes in Interface Builder.

Upvotes: 1

Views: 929

Answers (2)

gschandler
gschandler

Reputation: 3208

- (id)initWithCoder:(NSCoder *)decoder;

Also, for what it sounds like you are wanting to do, you may instead want to override:

-(void)awakeFromNib;

Upvotes: 4

Max O
Max O

Reputation: 1027

– initWithStyle:reuseIdentifier: is UITableVIewCell's designated initializer

Upvotes: 0

Related Questions