こんにちは、私のアプリケーションは、セルをクリックするとクラッシュします。この行を右に置くと、rowToSelect=indexPath;.しかし、この行が必要です。エラー
'-[__NSArrayM row]: unrecognized selector sent to instance 0x4c7080' * First throw call stack: (0x37e378bf 0x379831e5 0x37e3aacb 0x37e39945 0x37d94680 0x319921e9 0x319921af 0x5b47 0x3193f9cb 0x3193eaa9 0x3193e233 0x318e2d29 0x37d9622b 0x37430381 0x3742ff99 0x3743411b 0x37433e57 0x3742bd85 0x37e0bb4b 0x37e09d87 0x37e0a0e1 0x37d8d4dd 0x37d8d3a5 0x37b64fcd 0x3190d743 0x2927 0x28dc) terminate例外をスローするように呼び出されますプログラムはシグナルを受け取りました:「SIGABRT」。データ フォーマッターは一時的に利用できません。「続行」後に再試行します。(dlopen 関数が見つからないため、共有ライブラリをロードできません。)
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
rowToSelect=indexPath;//when i remove this line then my application is not crashing but when i keep
this line the i click section1 and row0 then application is crash why this happen where i am wong please help me
UIViewController <SubstitutableDetailViewController> *detailViewController = nil;
if ([indexPath row] == 0 && [indexPath section] == 0) {
TodoDetailViewController *newDetailViewController = [[TodoDetailViewController alloc] initWithNibName:@"TodoDetailViewController" bundle:nil];
detailViewController = newDetailViewController;
}
if ([indexPath row] == 0 && [indexPath section] == 1){
PeopleViewController *newDetailViewController = [[PeopleViewController alloc] initWithNibName:@"PeopleViewController" bundle:nil];
detailViewController = newDetailViewController;
}
if ([indexPath row] == 1 && [indexPath section] == 1){
DocumentsViewController *newDetailViewController = [[DocumentsViewController alloc] initWithNibName:@"DocumentsViewController" bundle:nil];
detailViewController = newDetailViewController;
}
if ([indexPath row] == 2 && [indexPath section] == 1){
PlannerViewController *newDetailViewController = [[PlannerViewController alloc] initWithNibName:@"PlannerViewController" bundle:nil];
detailViewController = newDetailViewController;
}
if ([indexPath row] == 0 && [indexPath section] == 2){
ArchivedPeopleViewController *newDetailViewController = [[ArchivedPeopleViewController alloc] initWithNibName:@"ArchivedPeopleViewController" bundle:nil];
detailViewController = newDetailViewController;
}
// Update the split view controller's view controllers array.
NSArray *viewControllers = [[NSArray alloc] initWithObjects:self.navigationController, detailViewController, nil];
splitViewController.viewControllers = viewControllers;
if (popoverController !=nil)
{
[popoverController dismissPopoverAnimated:YES];
}
.
if (rootPopoverButtonItem != nil) {
[detailViewController showRootPopoverButtonItem:self.rootPopoverButtonItem];
}
[detailViewController release];
}