Ios UIScrollView框架未更改

Ios UIScrollView框架未更改,ios,objective-c,cocoa-touch,views,scrollview,Ios,Objective C,Cocoa Touch,Views,Scrollview,我有一个UIScrollView,它通过设置contentOffSet来设置UIImageViews的动画,并在点击手势时扩展到self.view.frame。升级到7.1后,我无法再设置帧。它保持不变,但其contentView按预期调整大小。我错过了什么 if (!isFullScreen) { [UIView animateWithDuration:.7 animations:^{ [ima setAlpha:1]; [self.view bringSubview

我有一个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];


    }];

找到了。对于存在相同问题的任何人,问题在于viewController设置为Autolayout选项,这会引发另一个问题。为什么自动布局优先于任何视图的实际动态更改