0

I have a UIScrollView with a rather large amount of controls in it (like a long form or questionnaire).

The controls are static and can be added in IB, but the scroll view itself is not large enough for all the controls (scrolling is necessary, duh!), meaning that I can't see most of my controls in IB and have to align them "blindly".

Is there a way to simulate a scroll offset for a UIScrollView in IB?

JiaYow
  • 5,207
  • 3
  • 32
  • 36
  • for the most part, no. That is one thing i wish apple would implement, but for now, you just have to know where to place everything – user2277872 May 13 '14 at 12:49
  • Here is a very interesting implementation to look at: [uiscrollview][1] [1]: http://stackoverflow.com/questions/9118796/steps-for-creating-uiscrollview-with-interface-builder – user2277872 May 13 '14 at 12:52
  • If you are using storyboard then increase you viewController's view size otherwise in xib take separate scrollview and add subView to view. – guru May 13 '14 at 12:53
  • @user2277872 Your link, while not exactly answering my question, solved my problem. Please post it as an answer and I'll accept it. – JiaYow May 13 '14 at 13:01

2 Answers2

2

You don't need to, just size your UIScrollView to the size that is needed (it will come off the bottom on the phone screen layout in Xcode) and place the items on it

Chris
  • 1,637
  • 1
  • 14
  • 20
1

You should check out this link, it gives a great explanation on different ways to implement the UIScrollView.

UIScrollView implementation

Community
  • 1
  • 1
user2277872
  • 2,963
  • 1
  • 21
  • 22
  • As mentioned, it doesn't seem that there is a way to actually simulate a scroll offset in IB. The workaround in this answer provides an adequate solution though. – JiaYow May 20 '14 at 13:37