ストーリーボードを作成し、Single view application
ドラッグ アンド ドロップしましたTableView
。テーブルビューを膨らませてデータを取得することはできますが、次のいずれかをクリックするUITableViewCell
必要がありViewController
ます。別の をストーリーボードにドラッグ アンド ドロップし、新しく作成した にViewController
接続しました。メソッドから新しいViewコントローラーに移動する必要がありますMainViewController
ViewController
didSelectRowAtIndexPath
これを使ってみた
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
TestViewController *test = [self.storyboard instantiateViewControllerWithIdentifier:@"Testing"];
[test performSegueWithIdentifier:@"Test" sender:self];
}
このエラーが発生しています
2013-09-03 23:33:21.234 Storyboard[946:c07] * キャッチされていない例外 'NSInvalidArgumentException' が原因でアプリを終了しています。 stack: (0x1c92012 0x10cfe7e 0x45b679 0x2f14 0xc3285 0xc34ed 0xacd5b3 0x1c51376 0x1c50e06 0x1c38a82 0x1c37f44 0x1c37e1b 0x1bec7e3 0x1bec668 0x13ffc 0x28ed 0x2815) libc++abi.dylib: terminate called throwing an exception
私も試しました
[test performSegueWithIdentifier:@"Test" sender:self];
しかし、適切なコードを見つけることができません。どんな助けでも大歓迎です。