Я получил это сообщение об ошибке.ios crash issue - NSRange
GoogleAnalytics 2.0b3 void GAIUncaughtExceptionHandler(NSException *)
(GAIUncaughtExceptionHandler.m:41): Uncaught exception: *** -[__NSArrayM objectAtIndex:]:
index 2 beyond bounds [0 .. 1]
libc++abi.dylib: terminate_handler unexpectedly threw an exception
Когда я пытаюсь увеличить страницу, у меня произошел сбой и эта ошибка в авариях.
Thread : Fatal Exception: NSRangeException
0 CoreFoundation 0x31a202a3 __exceptionPreprocess + 162
1 libobjc.A.dylib 0x3974897f objc_exception_throw + 30
2 CoreFoundation 0x3196bb75 -[__NSArrayM objectAtIndex:] + 164
3 TestApp 0x000b1bfb -[EpisodeTableViewDelegate
tableView:didSelectRowAtIndexPath:] (EpisodeTableViewDelegate.m:155)
4 UIKit 0x338ea28d -[UITableView
_selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 876
5 UIKit 0x3396cf81 -[UITableView
_userSelectRowAtPendingSelectionIndexPath:] + 156
6 Foundation 0x3232e277 __NSFireDelayedPerform + 450
7 CoreFoundation 0x319f55df __
CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
8 CoreFoundation 0x319f5291 __CFRunLoopDoTimer + 272
9 CoreFoundation 0x319f3f01 __CFRunLoopRun + 1232
10 CoreFoundation 0x31966ebd CFRunLoopRunSpecific + 356
11 CoreFoundation 0x31966d49 CFRunLoopRunInMode + 104
12 GraphicsServices 0x3553f2eb GSEventRunModal + 74
13 UIKit 0x3387c301 UIApplicationMain + 1120
14 Tapastic 0x00075cb7 main (main.m:16)
15 Tapastic 0x000753b8 start
Мой код, как показано ниже:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:NO];
if (indexPath.section == 1) {
Episode *episode = [[Episode alloc] init];
[episode bindProperties:[self.pager.contents objectAtIndex:indexPath.row]];
[self.baseController performSegueWithIdentifier:SEGUE_EPISODE_VIEW sender:episode];
}
}
я не могу решить эту проблему. Как я могу это исправить? Если возможно, сообщите об этом. Спасибо заранее.