Advertisement
Guest User

NSUnknownKeyException

a guest
Mar 26th, 2013
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (UITableViewCell*) tableView:(UITableView*) tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  2.     static NSString *CellIdentifier = @"FriendDetailCell";
  3.     FriendDetailCell *cell = (FriendDetailCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  4.     if ( cell == nil ) {
  5.         NSString *szBundlePath = [[NSBundle mainBundle] pathForResource:@"ViewControllers" ofType:@"bundle"];
  6.         NSBundle *bundle = [NSBundle bundleWithPath:szBundlePath];
  7.         NSArray* topLevelObjects = [bundle loadNibNamed:@"FriendsTableViewController" owner:bundle options:nil];
  8.         for ( id currentObject in topLevelObjects ) {
  9.             if ( [currentObject isKindOfClass:[FriendDetailCell class]] ) {
  10.                 cell = (FriendDetailCell*)currentObject;
  11.                 break;
  12.             }
  13.         }
  14.     }
  15.    
  16.     // TODO: configure the cell
  17.     cell.profilePicture = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ViewControllers.bundle/icon_friend_invitation_on.png"]];
  18.     return cell;
  19. }
  20.  
  21. /**
  22. Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSBundle 0x692ef40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
  23. *** First throw call stack:
  24. (0x1617052 0x107ad0a 0x1616f11 0xb8a032 0xafbf7b 0xafbeeb 0xb16d60 0x40991a 0x1618e1a 0x1582821 0x40846e 0x40a010 0x61cda 0x283e0f 0x284589 0x26fdfd 0x27e851 0x229301 0x1618e72 0x288692d 0x2890827 0x2816fa7 0x2818ea6 0x2818580 0x15eb9ce 0x1582670 0x154e4f6 0x154ddb4 0x154dccb 0x1ef5879 0x1ef593e 0x1eaa9b 0x21e2 0x2115)
  25. terminate called throwing an exception
  26. **/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement