
Untitled
By: a guest on
May 1st, 2012 | syntax:
None | size: 1.16 KB | hits: 15 | expires: Never
UITableView not populating from UIView
// .h
@interface List : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
UITableView *mTableView;
}
@property (nonatomic, readonly) IBOutlet UITableView *tableView;
//------------------------------
// .m
@synthesize tableView=mTableView;
//Further I do the normal viewDidUnload stuff = nill
//And the numberOfSectionsInTableView, numberOfRowsInSection and
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"cellForRowAtIndexPath:");
NSLog(@"Table View: %@",[tableView description]);
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.textLabel.text = @"Hi";
// Configure the cell...
return cell;
}
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<List 0x6a78000> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableView.'