I have a .xib file containing a single custom UITableViewCell at the top level, as well as the File's Owner (NSObject) and First Responder.
From the many examples posted online, I then do
This all works fine in the simulator. The array topObjs contains two objects.
When running on the device however, the array only contains a single object, forcing the following change:
Could anyone please explain this difference? Thanks.
From the many examples posted online, I then do
Code:
NSArray *topObjs = nil;
topObjs = [[NSBundle mainBundle] loadNibNamed:@"MyTableCell" owner:self options:nil];
MyTableCell *cell = (MyTableCell *)[topObjs [B]objectAtIndex:1[/B]];
When running on the device however, the array only contains a single object, forcing the following change:
Code:
MyTableCell *cell = (MyTableCell *)[[B]topObjs objectAtIndex:0[/B]];
Could anyone please explain this difference? Thanks.