Note that there are some explanatory texts on larger screens.

plurals
  1. POuitableview throws bad access error object at indexpath
    primarykey
    data
    text
    <p>I keep getting this error:</p> <p>2013-03-30 19:48:40.029 try[14838:907] -[__NSSetM objectAtIndex:]: unrecognized selector sent to instance 0x1e8ea660 2013-03-30 19:48:40.030 try[14838:907] <strong>* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSSetM objectAtIndex:]: unrecognized selector sent to instance 0x1e8ea660' *</strong> First throw call stack: (0x33e523e7 0x3bb43963 0x33e55f31 0x33e5464d 0x33dac208 0xe5bc7 0x35cac569 0x35c91391 0x35ca8827 0x35c648c7 0x35a10513 0x35a100b5 0x35a10fd9 0x35a109c3 0x35a107d5 0x35a10639 0x33e27941 0x33e25c39 0x33e25f93 0x33d9923d 0x33d990c9 0x3797733b 0x35cb52b9 0x7b495 0x3bf70b20) libc++abi.dylib: terminate called throwing an exception (lldb) </p> <p>// Heres my code:</p> <pre><code>- (void)fetchTweets { UIApplication* app = [UIApplication sharedApplication]; app.networkActivityIndicatorVisible = YES; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSData* data = [NSData dataWithContentsOfURL: [NSURL URLWithString: @"***.json"]]; NSError* error; tweets = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&amp;error]; dispatch_async(dispatch_get_main_queue(), ^{ [self.tableView reloadData]; }); }); } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return tweets.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"showVideo"; CustomVideoCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(!cell) { cell = [[CustomVideoCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; } UIImageView *av = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 277, 58)]; av.backgroundColor = [UIColor clearColor]; av.opaque = NO; av.image = [UIImage imageNamed:@"cell_bg.png"]; cell.backgroundView = av; UIImage *image = [UIImage imageNamed:@"disclosure_arrow_white.png"]; UIImageView *av2 = [[UIImageView alloc] initWithFrame:CGRectMake(44.0, 44.0, image.size.width, image.size.height)]; av2.backgroundColor = [UIColor clearColor]; av2.opaque = NO; av2.image = [UIImage imageNamed:@"disclosure_arrow_white.png"]; cell.accessoryView = av2; NSDictionary *tweet = [tweets objectAtIndex:indexPath.row]; cell.title.text = [tweet objectForKey:@"title"]; NSLog(@"t: %@",[tweet objectForKey:@"title"]); return cell; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload