私はバックエンドとしてObjective C
使用しています。このテクノロジーは非常に新しいです。デザインテンプレートとしてマスターディテールを使用してプロジェクトを作成しました。詳細ビューでは、ポップアップを使用して詳細を表示しています。またxcode
、SUP 2.1.3
あそこのボタン。このボタンをクリックするとUIView
、ポップアップ自体で次のボタンに移動する必要があります。
そのために、さらに2つUIViewControllers
(viewController1とviewController2)を作成しました。そして、詳細ビューでは、次のようなポップアップのコードを記述しました。
-(void)popupAgain
{
ViewController1 *viewController = [[ViewController1 alloc] initWithNibName:@"ViewController1" bundle:nil];
viewController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:viewController animated:YES];
[viewController release];
}
そして、私はそのポップアップでそれらの上にボタンを置きます、私は次のpopupAgain関数を呼び出してviewController2のようなものを取得します
-(IBAction)next:(id)sender
{
[self popupAgain];
}
-(void)popupAgain
{
ViewController2 *viewController_new = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil];
viewController_new.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:viewController animated:YES];
[viewController_new release];
}
問題は、次のボタンをクリックすると、最初のポップアップを閉じて2番目のポップアップを表示する必要があることです。しかし、コードを書いていても最初のポップアップを閉じることはできません[self dissmissModalViewControllerAnimated:YES]; 次のようなボタンのアクションで、
-(IBAction)next:(id)sender
{
[self dissmissModalViewControllerAnimated:YES];
[self popupAgain];
}
誰かがこの問題を解決するのを手伝ってください。または、これに関して他に何かアイデアがありますか?私はこのテクノロジーに非常に慣れていません。よろしくお願いします。