load a reusable UITableViewCell from a XIB version 2

/ Published in: Objective C
Save to your folder(s)

Create a UITableViewCell subclass, add outlets for the controls you'll add later.
Create a View-based NIB
Delete the default 'view' in IB
Add a 'Table View Cell' instance
Set the 'Class Identity' to your UITableViewCell subclass.
Set the 'Identifier' (this is the reuse identifier) to be the name of your class - e.g. PersonDetailsInfoCell.
Add the controls you want in IB
Link the controls to the outlets in your subclass.

Then to actually load the custom cells add this odd piece of boilerplate code.. (here PersonDetailsInfoCell is my UITableViewCell subclass).

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.