IOS7 : UIScrollView offset in UINavigationController

后端 未结 8 1983
攒了一身酷
攒了一身酷 2020-12-04 04:57

I\'m currently migrating my app on ios 7 and I\'ve been stuck for hours on the new navigationcontroller/bar management.

Before, when we had a navigation controller,

8条回答
  •  盖世英雄少女心
    2020-12-04 05:33

    I also face this problem.

    UIScrollView content size is calculate by OS as other sizes, origins provided by constraint system - that's why OS has doubtfulness.

    How to fix - You should explicitly define content size of UIScrollView:

    1. Embed scrollable content to UIView (I rename it to ContentView)
    2. Add constraints:

    ContentView.Weight = View.Weight and ContentView.Height = View.Height

提交回复
热议问题