3

この目的のためにUIImageviewを水平位置でアニメーション化しています。以下のコードを使用しました。NSTimerを使用しました。

timer = [NSTimer scheduledTimerWithTimeInterval:0.2 target:self selector:@selector(onTimer) userInfo:nil repeats:YES];

-(void)onTimer
{
    [UIView animateWithDuration:10.0f animations:^{
          //Moving_Cloud is an image view
            Moving_Cloud.frame = CGRectMake(200.0f, 150.0f, Moving_Cloud.frame.size.width, Moving_Cloud.frame.size.height);
           }];

}

今私が直面している問題は、アニメーションの持続時間の後に「Moving_Cloud」の座標を取得する必要があること です。事前に感謝します

4

2 に答える 2