I am creating an application for the iPhone which involves having buttons which animate a image view, I created another view in which the buttons are held, however I would like to be able to horizontally or vertically, scroll this view of buttons. I have looked into adding scroll views and I have even followed a tutorial, But I just can't figure out how to add it to my app. Any Ideas anyone? In the tutorial I followed the guy adds the scroll view to the MainWindow.xib, now my app is created and designed in the viewcontroller.xib. So after following the tutorial when I hit build and go it loads that nib and all you see is a white background and a scroll view. (also in that tutorial he scrolled an image where as i would like to scroll a long view of buttons) I realize the newbie-ness of my question could be crazy, but I'm new to programming all together. Here's another additional question, if some one helped me get this scroll view working where would you design the contents of that scrolled view if it's length is longer than the iphone screen? Because It is my understanding that the space to design with in interface builder is the size of the iphone screen and designing interfaces longer than the iphone screen isn't do-able. (of course i know it is do-able i just don't know how to do it) Any help will be appreciated.

You could probably design each page of the scroll view as a separate sub view in the NIB and then shift the sub views origin to the correct page location either in Interface Builder or programmatically - but I have never tried this. If this works you'd then be able to layout your buttons using IB.

Thank you for that, But how would I actually get a scroll view working to add buttons programmatically? Because, as of now I have a scrollView in my interface but it just doesn't scroll how would I get it to scroll?
–
SamanthaJun 24 '09 at 20:49

How have you configured the content view? Is it set to be larger than the scroll view?
–
teabotJun 24 '09 at 21:03

Ahh, yes, it wasn't, but now it is and it works, oh and I solved my problem on setting the layout of something visually in IB thats bigger then the iphone screen without having to programmatically do it, basically you don't have to see the entire view of what you want to design, just design an iPhone screen size portion at a time. Thanks for your helpful advice.
–
SamanthaJun 25 '09 at 17:31

Oh by the way, would you know what code I could use to get rid of the scroll view? Because when a user presses a button in the scroll view I would like the scroll view to fade out at that point, but I would also like to know what code I could use to then display the scroll view again. Thanks in advance.
–
SamanthaJun 25 '09 at 17:42