-3

I am new to IOS development and I am trying to learn scroll view. I followed the tutorial online and drag and drop the scroll view onto the view controller, and I set the constrains for scroll view. Contraints After did this, I got error. Error I searched online and one solution is to Uncheck the "content layout guide". Solution However, that solution page did not explain why this works. I want to know thoroughly why did this uncheck action work rather than just know uncheck it and that's it; i.e, does not know anything in deeper detail. I hope anyone can help me know the detail about this solution. Thank you so much and Appreciate it.

TOM HANKS
  • 1
  • 2
  • Here's a resource that might help you with dealing with Scroll View: https://useyourloaf.com/blog/scroll-view-layouts-with-interface-builder/ – Lord Zsolt Dec 09 '19 at 16:54

1 Answers1

0

The original problem was not a problem. A scroll view that uses autolayout has no content size until you give it content and pin it to the scroll view’s content layout guide. The storyboard is right to tell you that. You made that impossible by taking away the content layout guide.

matt
  • 515,959
  • 87
  • 875
  • 1,141