0

エラーを警告するためにポップアップ効果で小さなビューをアニメーション化しています...アニメーションは完全に機能しますが、ビューが位置(x 25)で停止しないようにしたいので、まだあまり満足していませんが、 ( x 40 )、すぐに ( x 25 ) に戻ります。言い換えれば、オペレーティングシステムへのアクセスのためにユーザーフィールドを挿入するのが間違っている場合に、テキストフィールドMontainLionに与える影響を再現したいと思います...

私は私に説明できることを本当に望んでいますが、うまくいかなかった場合は、comunicarmelo に連絡してください。ありがとうございます!ロリー。

以下に、使用しているポップアップを表示するコードを示します

- (Void)presentazioneViewTransition
{
    CGRect endREct ;
    endREct = CGRectMake (25, 160, 270, 90);
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.25];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(endRightAnimation)];

    self.frame = endREct;
    [UIView commitAnimations];
}
4

1 に答える 1

1

このようなシンプルなブロックベースの UIView アニメーションメソッドを使用できます

-(void)presentazioneViewTransition{
    CGRect transitionRect = CGRectMake(40.0f, 160.0f, 270.0f, 90.0f);
    CGRect endREct = CGRectMake (25.0f, 160.0f, 270.0f, 90.0f) ;
    [UIView animateWithDuration:0.15f
                     animations:^{
                         self.frame = transitionRect;
                     }
                     completion:^(BOOL finished) {
                         [UIView animateWithDuration:0.1f
                                          animations:^{
                                              self.frame = endREct;
                                          }];
                     }];
}
于 2013-10-20T14:38:54.343 に答える