Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 1.16 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. UITableView not populating from UIView
  2. // .h
  3. @interface List : UIViewController <UITableViewDelegate, UITableViewDataSource>
  4. {
  5.     UITableView *mTableView;
  6. }
  7.  
  8. @property (nonatomic, readonly) IBOutlet UITableView *tableView;
  9. //------------------------------
  10. // .m
  11. @synthesize tableView=mTableView;
  12.  
  13. //Further I do the normal viewDidUnload stuff = nill
  14. //And the numberOfSectionsInTableView, numberOfRowsInSection and
  15.  
  16. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  17. {
  18.     NSLog(@"cellForRowAtIndexPath:");
  19.     NSLog(@"Table View: %@",[tableView description]);
  20.     static NSString *CellIdentifier = @"Cell";
  21.  
  22.     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  23.     if (cell == nil) {
  24.          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
  25.     }
  26.     cell.textLabel.text = @"Hi";
  27.     // Configure the cell...
  28.  
  29.     return cell;
  30. }
  31.        
  32. *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<List 0x6a78000> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableView.'