我有一些视图和图片视图。
问题在于旋转动画停止了。如果我将_contentView的自动调整大小掩码更改为灵活的边界,则可以继续进行旋转动画。但我需要它具有灵活的大小。 有人能解释一下为什么旋转后动画会停止吗?
_contentView = [[UIView alloc] initWithFrame:self.bounds];
_contentView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
....
UIImageView *imageView = [[UIImageView alloc] initWithImage:someImage];
[_contentView addSubview:imageView];
这个imageView运行一些动画。
[UIView animateWithDuration:1.6f delay:0.0 options:UIViewAnimationOptionAllowUserInteraction |UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat animations:^{
imageView.center = somePoint;
} completion:^(BOOL finished) {
}];
问题在于旋转动画停止了。如果我将_contentView的自动调整大小掩码更改为灵活的边界,则可以继续进行旋转动画。但我需要它具有灵活的大小。 有人能解释一下为什么旋转后动画会停止吗?