Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Xino

macrumors member
Original poster
Sep 5, 2008
36
0
I've created an UIView and renamed the class to UIScrollView. This is the code for making the UIView bigger then te screen:

Code:
settingsUIScrollView.contentSize = CGSizeMake(320,600);

Everything works so far but I want to add a lot of elements to that view. The problem is I can't add them with Interface Builder because I can't reach the space outside the window. In other words, I'm unable to scroll in Interface Builder and therefor unable to add more elements.

When I've created some elements (UIButton, UILabel, etc.) and I select all of them and drag them to somewhere below the window and executed the application, I'm able to scroll and see those elements but can't reach them anymore in Interface Builder...

I don't want to add all of those buttons, labels, etc. via code.

How to solve this problem?
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
I haven't done this but you can set the height of a view to be 600 in IB. Maybe you need to set the size in IB to 600 temporarily, do your layout, then set it back to 460.
 

Xino

macrumors member
Original poster
Sep 5, 2008
36
0
And can you tell me how to do that? I don't see an option to set the size of the window?
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
Select the view in the xib window. In the Inspector window click on the little ruler on the top. It should say Frame in the popup. In the box marked H enter the height you want. Click return.

This pane is also called the Size Inspector in the menu bar.
 

Xino

macrumors member
Original poster
Sep 5, 2008
36
0
Hm I can change the height of the UIScrollView but I'm still unable to "scroll" down the UIScrollView in Interface Builder to drag and move objects such as UILabel, UIButton, etc. to the view...

The problem is I can't reach the space above or below to style the view..

I hope you can help me out with this one..
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
You may want to look at the PageController sample code. It seems to be the only one that has a UIScrollView.

The problem is I can't reach the space above or below to style the view..

I don't understand what you mean by this. If you resize the scrollview in IB to be large then you should see a window with the title Scroll View that is as large as the size you've set. Just drop labels and whatever into that window and drag them to whatever position you want.

Make sure you set the View Mode to lines in the xib window. If you double-click on Scroll View in that window do you see the new Scroll View window appear?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.