UIScrollView won't scroll (Storyboards)

后端 未结 2 1059
我在风中等你
我在风中等你 2021-01-12 07:33

I\'m new to Storyboards; I\'ve done some Interface Builder before and lots of manual UI positioning. I\'ve searched this issue, tried the solutions found in the other releva

相关标签:
2条回答
  • 2021-01-12 07:36

    Just add the following method:

    - (void)viewDidLayoutSubviews
    {
        [super viewDidLayoutSubviews];
        [self.scrollView setContentSize:CGSizeMake(320, 1700)];
    }
    

    This is working perfectly for me.

    0 讨论(0)
  • 2021-01-12 07:47

    Two things turned out to be necessary:

    1) Set height of scrollview to 480.

    2) Add constraint to the bottommost field in the scrollview. The constraint was Pin >> Bottom Space to Superview.

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