ScrollView start scroll only second time that the view appear

北慕城南 提交于 2019-12-13 07:39:20

问题


I've a problem with my view in iOS7 with autolayout.

This is my structure:

The UITextView content is dynamic so I fit his contentSize dynamically in the viewDidLoad.

In my viewDidAppear I try to fit the contentSize of the MainScroll and the mother view calculated by the sum of UIScrollView height (the little one), Pager height and UITextView height. I logged this height and it returned the correct size: 1300px but the view doesn't scroll.

If I change tab and return here the scroll start to scroll, I've tried to put every piece of code in the viewDidLoad but it doesn't work.

Can you help me?

Thanks and sorry for bad English.


回答1:


Try selecting it and then selecting "reset to suggested constraints" in the storyboard. :).



来源:https://stackoverflow.com/questions/19227297/scrollview-start-scroll-only-second-time-that-the-view-appear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!