i have a not custom table view view that i mean that i’m using the cellForRowAtIndexPath. I want my cell to have 2 labels one for a title and the other for a date. I have tried to use this code that doesn’t work:
CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 109.0f);
UIView* view = cell.contentView;
UILabel* labelTitle = [[UILabel alloc] initWithFrame:myImageRect];
UILabel* labelDate = [[UILabel alloc] initWithFrame:myImageRect];
[cell addSubview:labelTitle];
[cell addSubview:labelDate];
cell.labelDate.text = @"title";
cell.labelTitle.text = @"date";
I get an error saying: Property 'labelDate' not found on object of type 'UITableViewCell *'
So it seems that the cell doesn’t recognize my labels. Can thsi be done in some way?
Thanks in advance.
try