0

FWIW I'm using Xcode 4.5.1.

I have a View that will contain UI elements (e.g. UIButtons). The View is wider than the device screen, so it will be placed under a scrollview.

The problem is that I cannot see the View in the storyboard except for that part that is physically within the screen boundaries. Is there a way in xcode/storyboard to show the full width and height of the View (for editing, dragging and dropping buttons, etc)? It is extremely difficult to graphically edit this oversized view...

Electro-Bunny
  • 1,380
  • 2
  • 12
  • 33

3 Answers3

2

A little further digging through stackoverflow turned up the following:

Visually arrange subviews in a large uiscrollview

This is still not optimal because it seems one has to re-enlarge the UIScrollView every time you want to edit the underlying content View. But this is how I am currently handling this.

Community
  • 1
  • 1
Electro-Bunny
  • 1,380
  • 2
  • 12
  • 33
0

Have you thought of creating a view object in the storyboard at whatever size you want outside of the scrollview?

You can then add this view as the content view of the scrollview by the view controller when it loads.

Abizern
  • 146,289
  • 39
  • 203
  • 257
  • 2
    I wondered about this, and it seems that the old Interface Builder/nib editing had this ability. But with the new storyboarding you cannot simply drag a UIView onto the storyboard workspace... you must drag it into a UIViewController, right? – Electro-Bunny Oct 10 '12 at 18:55
0

I have a simple solution for this, (without loss of generality let's assume you just need a long vertical scroll, about twice the height of the screen)

First add a view to the scrollview which is a little smaller in height than the scrollview itself.this view will contain all of the subviews which should appear in the bottom half of the scrollview. Call it the "bottom" view.

now any subview you want to appear on the bottom half of the long scrollview, just add it to the "bottom" view. When you've done editing it, you can drag the "bottom" view downwards, thus relocating all subviews. when you need to edit it, just drag it upwards. Of course don't forget to set the proper contentsize for the uiscrollview.

Ilan lewin
  • 1,599
  • 1
  • 14
  • 24