Custom nib UITableViewCell height
- by Chuck
I've created a custom UITableViewCell in IB, linked it to the root view controller's property for it, and set it up in CellForRowAtIndexPath. But the height of my drawn cells doesn't match what I setup in IB, advice? Here's some screenshots and the code.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *AddressCellIdentifier = @"AddressCellIdent";
UITableViewCell *thisCell = [tableView dequeueReusableCellWithIdentifier:AddressCellIdentifier];
if (thisCell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"AddressCell" owner:self options:nil];
thisCell = addressCell;
self.addressCell = nil;
}
return thisCell ;
}
addressCell is a @property (nonatomic, assign) IBOutlet UITableViewCell *addressCell;, and is linked up in IB to the file's owner (the table view controller).
I'm using the example from Apple's table view programming guide.