ScrollView start scroll only second time that the

2019-08-29 00:02发布

问题:

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. :).