How to do it...

  1. Create a new Xcode project with Single View Application template and with the ScrollViewDemo name.
  2. Open Main.storyboard to build a login screen where the user will be able to enter his credentials and we will later come across a situation where we will need the scroll view.
  3. Open ViewController screen in storyboard to add a scroll view. From Object Library, drag a scroll view that fills the whole screen with the following constraints:
      ScrollView.trailing = superview.trailing 
      ScrollView.top = superview.top 
      ScrollView.leading = superview.leading 
      ScrollView.bottom = superview.bottom 
  1. Add an empty view that identifies the boundary of the scroll view that has the same frame of scroll view. Add all these constraints to the view: ...

Get iOS Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.