xcode 4.2とストーリーボードを使用してコードを介してビューを変更するにはどうすればよいですか? ダイナミックテーブルビューのセルをクリックするとビューを変更しようとしています。 そのダイナミックなので、私はちょうど...セグエでxcode 4.2とstoryboardを使用して、コードを介してビューを変更しますか?
それをリンクすることはできませんスタックオーバーフロー上の別の記事で示唆されたが、それは動作しませんように私はこのコードを使用して変更しようとしました:
UIViewController *alertView = [self.storyboard instantiateViewControllerWithIdentifier:@"alertView"];
[self.navigationController pushViewController:alertView animated:YES];
を
ここに私のコードのスニペットがあります。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.row==0){
UIViewController *alertView = [self.storyboard instantiateViewControllerWithIdentifier:@"alertView"];
[self.navigationController pushViewController:alertView animated:YES];
NSLog(@"This code is being called...");
}
「私はただでそれをリンクすることはできませんそのダイナミックなので、 segue ... "そうです、プロトタイプから次のView ControllerにCtrl +ドラッグするだけです。あなたはこれを試して、運がなかった? – jrturton