Search code examples
iphoneinterface-builderuiscrollviewuitextfielddata-entry

How to set up UIScrollView in Interface Builder with UI elements outside the main iPhone view?


I am building a data entry form in my iPhone app, and there are more data fields than will fit on the screen. I figured I should put them into a UIScrollView so that the user can scroll through the form. What's the best way to build this in Interface Builder? I know that I can do it programmatically, but I'd like to do it in Interface Builder if I can. The problem is, how can I lay out UILabels, UITextFields, etc. if they fall outside of the main iPhone screen--in the part of the screen for which the UIScrollView becomes useful?


Solution

  • Double click to open the UIScrollView itself in IB, and increase the size to the size you need or bigger (you can always shrink at runtime). Then just add the elements.

    EDIT: Doesn't work - see here instead.