UITableView - iPad - Property '' Not Found on Object of type UITableViewCell

Posted by user1797508 on Stack Overflow See other posts from Stack Overflow or by user1797508
Published on 2012-11-20T16:37:30Z Indexed on 2012/11/20 17:00 UTC
Read the original article Hit count: 203

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about xcode

Related posts about iPad