Q:

How to create CustomCell programmatically?

I have two arrays 
1)nameArray;
2)numberArray;
These arrays contains names and numbers , I want to display these name and numbers in a tableview without using nib . How to create custom cell  programmatically

A:

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *identifier = @"CellIdentifier";
CustomCellName *cell = (CustomCellName *)[tableView dequeueReusableCellWithIdentifier:identifier];
if(!cell) {
cell = [[CustomCellName alloc] initWithStyle:UITableViewStyleDefault reusableIdentifier:identifier];
}
cell.textLabel.text = [nameArray objectAtIndex:indexPath.row];
cell.subtextLabel.text = [numberArray objectAtIndex:indexPath.row];
return cell;
}

The above code isn't tested, I'm not on a computer to do this (rather on my iPhone typing this all out) but it should be pretty much what you need code wise.
textLabel = property name you set for the label in your custom cell class
subtextLabel = property name you set for the label in your custom cell class
Hope this helps!

