You need to subclass
UITableViewCell
then you've to add a new 'View' file (refer to image below)Delete the
UIView
file in.xib
and addTable View Cell
fromobject library
.
3.Set the custom class for your cell
CustomCell *cell = (CustomCell*)[tableView dequeueReusableCellWithIdentifier:identifier];
if (cell == nil) {
// Load the top-level objects from the custom cell XIB.
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
// Grab a pointer to the first object (presumably the custom cell, as that's all the XIB should contain).
cell = [topLevelObjects objectAtIndex:0];
}