Create custom cell in table view

Published on Author bloggerten
  • Create TableView in ViewController
  • Right click in ViewController open New file Select objective-c class Click Next
  • Create TableViewCell name and Select subclass:”UiTableViewCell” Click next then create a TableViewCell
  • Add a Empty Xib.
  • Drag the TableViewCell in that empty Xib.
  • Select the TableViewCell,Select Identity and Type and Give the class name as TableViewCell


– (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath


Cell1  * cele=(Cell1 *)[tabl dequeueReusableCellWithIdentifier:@”Cell1″];

if (cele == nil)

cele=[[[NSBundle mainBundle]loadNibNamed:@”cell1″ owner:self options:nil]objectAtIndex:0];

cele.label1.text=[arrforlab objectAtIndex:indexPath.row];

cele.image1.image=[UIImage imageNamed:[arrforimg objectAtIndex:indexPath.row]];

// Configure the cell.

return cele;




Categories IOS