Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think that function you have going on there is unnecessary, there's probably something you're missing in regards to what the Autolayout system is attempting to accomplish with your view.</p> <p>After searching around, I found a couple of threads.</p> <p>There's <a href="https://stackoverflow.com/questions/13439304/uiscrollview-setcontentsize-breaks-view-with-auto-layout">this</a>, where the accepted solution is changing the contentSize <em>after</em> layout by using <code>viewDidLayoutSubviews</code>. Seems hacky.</p> <p>Overall, <a href="https://stackoverflow.com/a/13548039/700471">here</a> is a good general description of what you are doing with ScrollViews in AutoLayout, and he links to <a href="http://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-6_0/index.html" rel="nofollow noreferrer">the iOS 6 release notes</a> (search UIScrollView) where Apple gives several examples of how to make ScrollViews correctly. I'm sure that you'll be able to handle it with that.</p> <p>Also, although it's not entirely clear from your question, if you think that maybe some of your layout constraints are breaking, you can see this output in the debugger--nice big blocks of statements saying precisely what constraints cannot be satisfied and why, which, after some deciphering, may point to the source of your problem. That might not be related at all, because it sounds like you're simply not using the system at all, but it's data you might not have.</p> <p>Good luck!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload