UITableView - iPad - Property '' Not Found on Object of type UITableViewCell
- by user1797508
I have added a UITableView prototype Cell into a UIView for an iPad application using StoryBoard in Xcode (targeting iOS6).
The problem I'm having is that the labels are not being recognized in my viewController when I try to reference them.
In my implementation, I have:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"dashboardMessage";
UITableViewCell *cell = [_tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
int row = [indexPath row];
cell.messageSender.text = [_matches valueForKey:@"from"];
}
The last line is causing an error: Property 'messageSender' Not Found on Object of type UITableViewCell
In the cell's header file I have:
@interface DashboardMessageCell : UITableViewCell
@property (strong, nonatomic) IBOutlet UILabel *messageSender;
@property (strong, nonatomic) IBOutlet UILabel *messageDescr;
and the header file is imported into the viewController.
I'm lost as to what can be causing the issue, any help would be greatly appreciated.
Thanks.