UIScrollView doesn't scroll after upgrading to iOS7 / xcode 5

后端 未结 9 1933
抹茶落季
抹茶落季 2020-12-03 03:42

I have an app which in xcode 4.5 and ios 6.1 worked perfectly fine when scrolling. However, after downloading xcode 5 and iOS 7 my scroll views does not work anymore.???

相关标签:
9条回答
  • 2020-12-03 04:04

    I just solved it by going to Editor > Resolve AutoLayout Issues > Add Missing Constraints in View Controller

    Hope this helps.

    0 讨论(0)
  • 2020-12-03 04:09
    - (void)viewDidLayoutSubviews {
        [self performSelector:@selector(updateContentSize)
                   withObject:nil
                   afterDelay:0.25];
    
    }
    
    -(void)updateContentSize{
        UIView *viewLast = [viewContent viewWithTag:100];
        scrollViewAd.contentSize = CGSizeMake([UIScreen mainScreen].bounds.size.width, CGRectGetMaxY(viewLast.frame));
    }
    
    0 讨论(0)
  • 2020-12-03 04:09

    With AutoLayout enabled, make sure Vertical Spacing (@"V:|-[subview]-|") is applied between the UIScrollView and its subview. If your scrollView is for horizontal scrolling, apply Horizontal Spacing (@"H:|-[subview]-|").

    0 讨论(0)
提交回复
热议问题