title: Terminating app due to uncaught exception 'NSUnknownKeyException' this class is not key value coding-compliant for the key .img
body: <p>Trying to load image asynchronously I'm getting this error <strong><em>"Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ valueForUndefinedKey:]: this class is not key value coding-compliant for the key img.'"</em></strong> 
  My code is as below</p>
  
  <pre><code> NSString *str = "URL of an image";
  
      NSMutableDictionary *record = [NSMutableDictionary dictionary];
      [record setObject:str forKey:@"img"];
  
      record = [_array objectAtIndex:indexPath.row];
  
  
  
     dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH,  0ul);
      if ([record valueForKey:@"img"]) {
          NSLog(@"in if");
          cell.m_img.image =  [record valueForKey:@"img"];
      } else {
          dispatch_async(queue, ^{
               NSLog(@"in else");
              NSURL  *imageurl = [[NSURL alloc] initWithString:str];
              NSData *image = [[NSData alloc] initWithContentsOfURL:imageurl];
  
              dispatch_async(dispatch_get_main_queue(), ^{
                  [record setValue:[UIImage imageWithData:image] forKey:@"img"];
  
                  [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
              });
          });
      }
  </code></pre>
  
  <p>Please advise where am I getting wrong here. 
  Thanks
  Mayur</p>