Hi all, In my application I'm creating a .xib of a class and loading that .xib on cells of uitableview of another class. I want to add this .xib to cell.contentView and not cell. How shall I do that?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString* cellIdentifier = @"testTableCell";
testTableCell * cell = (testTableCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"testTableCell" owner:self options:nil];
cell = tCell;
}
return cell;
}
testTableCell is my another class in which I have two labels and two buttons, of which I have created a .xib and loading it to tableview's cell as above. tCell is an object of class testTableCell.
This' really urgent. Can anybody please help? Thanks in advance.