これはしばらくの間この問題に取り組んできましたが、私の専門知識を超えているので、なぜ私は再び助けを求めていますか?UITabBarControllerビュー遷移エラー
私は、タブバーボタンクリックのためのトランジションを別のビューにアニメートしようとしています。私は左に、右とSecondViewControllerに両方のViewController(ViewWillAppear)メソッドで
- (void)viewWillAppear:(BOOL)animated
{
//TODO: Fix transition animation
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight
forView:self.view cache:YES];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[UIView commitAnimations];
[super viewWillAppear:animated];
}
FirstViewController以下のコードを宣言しました。
これで、ユーザーが初めてアプリケーションを読み込んだときに、すべてがロードされ、ユーザーがタブバーボタンをクリックして2番目のビューに移動すると、問題は起こっています。 FirstViewそれはあなたが2回目に行くと再びアニメートします。この時間はアニメ化されます。誰にもこれがなぜ起こっているのか考えてもらえますか?あなたの助けを借りれば大いに感謝されます!
UPDATE :: 私はviewDidLoadにアニメーションを追加しようとしていますが、開かれているシーケンスのアニメーションは既にあります。すぐにロードしています。
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
//-- Start Opening Animation ------->
CGRect vaultTopFrame = vaultTop.frame;
vaultTopFrame.origin.y = -vaultTopFrame.size.height;
CGRect vaultBottomFrame = vaultBottom.frame;
vaultBottomFrame.origin.y = self.view.bounds.size.height;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:2.5];
[UIView setAnimationDelay:2.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
vaultTop.frame = vaultTopFrame;
vaultBottom.frame = vaultBottomFrame;
[self.view bringSubviewToFront:vaultTop]; //this should place this subview above any others on the same page
[self.view bringSubviewToFront:vaultBottom]; //this should place this subview above any others on the same page
[UIView commitAnimations];
これは私にとって何かを混乱させるかもしれないと思いますが、どう思いますか?
私は実際にこの最初のビューコントローラーでこの他のアニメーションを起こしています。どうやって互いに干渉することなく2つを動かすことができますか? –
私は本当にあなたを得ることはありません。彼らはどうやって互いに干渉しますか? – Legolas
よくviewDidLoadで実行されている他のアニメーションのコードを追加しますが、メソッドを実行していた元のアニメーションを実行したときにはうまくいきますが、tabbariconsは画面上でこの奇妙なスライドを行います...上記を編集します提案のおかげで最初のアニメーション –