I defined this in code:
@property (nonatomic, weak) IBOutletCollection(UITableViewCell) NSSet * certaintyCells;
and is synthesized. I am absolutely sure that this controller is used in the bulletin board and has connected three cells to this collection.
Next, in the call to the didSelectRowAtIndexPath: method, I added this code by adding an NSLog for debugging:
NSLog(@"Certainty Cells: %@",certaintyCells); for (UITableViewCell * cell in certaintyCells) { [cell.textLabel setTextColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:1]]; [cell setSelectionStyle:UITableViewCellSelectionStyleBlue]; }
Output:
Certainty Cells: (null)
And, of course, the expected behavior does not occur.
Any ideas as to why this is happening? I am sure that I am using static cells, not dynamic prototypes. As an additional note, these three cells are also associated with (working) individual IBOutlets.
Thanks,
iphone storyboard iboutlet
Alex gosselin
source share