Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. Saving, Editing, and Sorting Data: Ev... > Wrap your content in a scroll view

Wrap your content in a scroll view

We want the user to be able to scroll through our controls when the keyboard covers some of them up. In order to do that, we need to add a UIScrollView to our view and then tell it about the controls (the content view) we want it to handle.

image with no caption

You’ve got a point.

Remember when we said sometimes Interface Builder makes things (a lot) easier? This is one of those times...

Easy GUI Reconstruction

Apparently we aren’t the first people to realize after we’ve built a view that it needs to be scrollable. Interface Builder has built-in support for taking an existing view and wrapping it in a UIScrollView.

Highlight all the widgets (as shown here) in the detail view, then go to the EditorEmbedScroll View menu option. Interface Builder will automatically create a new scrolled view and stick all the widgets in the same location on the scrolled view.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial