【发布时间】:2014-03-21 10:49:17
【问题描述】:
我有一个 UIScrollView,它通过设置 contentOffSet 为 UIImageViews 设置动画,并且在点击手势时它会扩展为 self.view.frame。升级到 7.1 后,我无法再设置框架。它保持不变,但它的 contentView 会按预期调整大小。我错过了什么?
if (!isFullScreen) {
[UIView animateWithDuration:.7 animations:^{
[ima setAlpha:1];
[self.view bringSubviewToFront:_scrollView];
[self.navigationController setNavigationBarHidden:YES animated:YES];
[_scrollView setFrame:[[UIScreen mainScreen] bounds]];
[_scrollView setBackgroundColor:[UIColor lightGrayColor]];
for (UIImageView *im in _scrollView.subviews) {
[im setFrame:CGRectMake(im.frame.origin.x+10, im.frame.origin.y, _scrollView.frame.size.width-20, _scrollView.frame.size.height)];
[im setClipsToBounds:YES];
[im setUserInteractionEnabled:NO];
}];
【问题讨论】:
标签: ios objective-c cocoa-touch views scrollview