私のビューでイメージを使用してアニメーションを作成しようとしましたが、動作しません。イメージはアニメーションなしの最終位置にあります。UIModalTransitionStyleFlipHorizontalで表示されたビューでアニメーションが機能しない
UIImage *myImg = [UIImage imageNamed : @"Img72.png"];
UIImageView *myImgView =[ [UIImageView alloc] initWithImage: myImg ];
myImgView.frame= CGRectMake(250,50,72,72);
[self.view addSubview:myImgView];
[UIView animateWithDuration:0.5
delay: 0.0
options: UIViewAnimationOptionCurveEaseInOut
animations:^{
[UIView setAnimationRepeatCount:100.0];
[UIView setAnimationRepeatAutoreverses:YES];
myImgView.frame= CGRectMake(50,250,72,72);
}
completion:NULL];
[myImgView release];
別のビューでも同じアニメーションコードが完全に機能します。私は最終的にそれは私がこのコードでビューを表示する方法から来ていることを見つける:
FlipsideViewController *controller = [[[FlipsideViewController alloc] initWithNibName:@"FlipsideViewController" bundle:nil] autorelease];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; //KO
[self presentModalViewController:controller animated:YES];
問題がmodalTransitionStyle
です。私がラインをコメントすると(// KO)、最終的に動作します。私はviewDidLoadProject
(ユーティリティアプリケーション)を作り、ちょうどviewDidLoad
方法で2つのビューでのアニメーションのコードを追加し
を他の遷移スタイルをテストし、すべての他の作品(UIModalTransitionStyleCoverVertical
、UIModalTransitionStyleCrossDissolve
、UIModalTransitionStylePartialCurl
)。
問題はどこですか? Appleのバグですか?フリップ・トランジションとアニメーションを2番目のビューで動作させるにはどうすればいいですか?ここで
は、私の例のプロジェクトです:http://dl.dropbox.com/u/9204589/testFlipAnimation.zip
YEEEEESSSSSS、それはとても簡単だった:-)あなたの迅速かつ完璧な答えてくれてありがとう。フランスで言うように "J'avais latêtedans le guidon" – Alex
ブルズアイ!ちょうど私が欲しいもの – Siddharthan