2012-05-08 8 views

答えて

6

は、ファイルとグループセクションとクリック「新規ファイル」オプションと名前を付けSecondViewControllerで右クリックして、アプリケーションに新しいのUIViewControllerを追加します。

はSecondViewController

を作成中にオプション「ユーザー・インタフェースためXIBで」を選択することでXIBを追加していることを確認してくださいあなたは、あなたにFirstViewControllerをボタンを追加し、追加ボタンをクリックしたときに新しいビューをプッシュするとしますそのボタンのTouchUpInsideイベントに次のコード:

SecondViewController *secondView=[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; 
[self.navigationController pushViewController:secondView animated:YES]; 
[secondView release]; 

あなたはARCを使用している場合は、その後[secondView release];を削除します。

さらなるヘルプが必要な場合はお知らせください。

これが役に立ちます。

1
FileName *file=[[FileName alloc] initWithNibName:@"FileName.xib" bundle:nil]; 
[self.navigationController pushViewController:file animated:YES]; 
[file release]; 
関連する問題