【发布时间】:2013-02-07 01:28:00
【问题描述】:
我有一些视图和图像视图。
_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 的自动调整大小掩码更改为灵活边界动画在旋转后继续。但我需要它具有灵活的尺寸。 谁能解释为什么动画在旋转后停止?
【问题讨论】:
标签: ios objective-c uiview autoresizingmask