こんにちは、xcode 3.2.3 でアプリを作成しています。私がやりたいことは、別のビューに切り替えることだけですが、これを行う最善の方法がわかりません。この2つの方法のいずれかで実行できます...
PreferencesViewController *screen = [[PreferencesViewController alloc]initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:screen animated:YES];
[screen release];
または使用して...
PreferencesViewController *screen = [[PreferencesViewController alloc]initWithNibName:nil bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[self.view addSubview:screen.view];
[UIView commitAnimations];
これらの方法の両方にいくつか問題があります。presentModalViewController を使用し、PreferencesViewController でメモリ警告をシミュレートすると、アプリがクラッシュします。これは、2 番目の方法には当てはまりません。ただし、2 番目の方法では、フリップ アニメーション中にボタンが奇妙に見えます。
誰かが何が間違っているか教えてくれますか、どの方法が正しいかアドバイスしてくれますか?
ありがとう