Fun with auto-layout and scrollview

This post covers the basics of using auto-layout and scrollview. So with the advent of bigger screen iPhones it has become (not just almost but completely) important to understand the mechanics of auto-layout. So I hope you will find this post useful incase you are having difficulty using scrollview and auto-layout.

Here is the complete process assuming you want vertical scrolling:


Now lets say you want to add 3 subviews each of height 400px (total = 1200px)



Now if everything went as planned then your container view height will automatically increase to 1200px or more in the xib/storyboard.


Now why this works ?


 
10
Kudos
 
10
Kudos

Now read this

iOS < Design, Development > issue - 4

devRead # Advanced iOS development features Many app-related tasks depend on the type of app you are trying to create. This topic shows you how to implement some of the common behaviors found in iOS apps. CocoaPods by Objc.io CocoaPods... Continue →