I have a Custom Cell designed in storyboard
, it is inside a UITableViewController
which is working fine with the custom cell.
Now, I'm trying to use the same cell on a UITableViewController
with a UISearchDisplayController
and it is not working.
This is my method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object {
static NSString *CellIdentifier = @"CustomCell";
CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[CustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier ];
}
cell.titleLabel.text = object[@"title"];
cell.subtitleLabel.text = object[@"subtitle"];
return cell;
}
It just return white, regular cells, and if I use the default cell.textLabel.text
it shows my objects.