【问题标题】:UIView animation doesn't get called when view is reloaded重新加载视图时不会调用 UIView 动画
【发布时间】:2012-05-09 16:26:18
【问题描述】:

我为UIImageView 编写了以下动画,当我加载视图时它可以正常工作:

-(void) viewDidAppear:(BOOL)animated{
    [UIView animateWithDuration:2
                          delay:0
                        options:UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse
                     animations:^{
                         hat.transform = CGAffineTransformMakeRotation(0.2);
                     }completion:nil
     ];

}

然后我在这个视图上推了一个新的视图控制器,但是当我弹出这个新的视图控制器时,动画不会触发......我试过把这个动画代码放在 viewDidload 和 @987654325 中@ 但这没有帮助...有什么想法吗?

【问题讨论】:

标签: ios animation core-animation


【解决方案1】:

UIImage 视图是否有可能被卸载?如果你还没有尝试为你的 UIImageView 设置 strong/retain 属性。

【讨论】:

猜你喜欢
  • 2023-04-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多