views:

209

answers:

2

hi everybody! i'm italian so sorry for my bad english :D

so... i've this simple program: a navigation controller controll two view (the first view and another inside a UIViewController). I want to scroll the text (and images) in my second view. how can i do that? have i to use uiscrollview? how? i'm a newbie :P

this is my program: http://www.megaupload.com/?d=T13RMUQ3

thanks a lot (and i remeber for you... i'm a newbie so, please, describe all the process that i've to do!) :D

A: 

I'm a little confused, but I think the easiest way to do this will be in Interface Builder. I'm assuming you have used the template for the view based application available in xcode. Open MainWindow.xib in interface builder, and drag a new UIScrollView into the window, resizing and positioning it as you please. Then add a UIView to the new UIScrollView by dragging one on top. Then, add your text and images to this UIView. If you want to access these objects programatically, you will have to create an IBOutlet instance of the specific object, and then synthesize it in your .m file.

James
sorry but... i've tryed but it doens't work (or, of course, i'm doing something wrong)! if i put the UIScrollView into the window and then the UIView into the scrollview... when i try it it doens't scroll!i can see only the textlabel/pictures that are in the normal view (and it isn't "scrollable")... if you want try with my source code! ^^"
JJSaccolo
This line of code is necessary:yourScrollView.contentSize = CGSizeMake(WIDTH, HEIGHT);or when you add the uiview to the uiscrollview in IB, you must make it larger than the UIscrollview. If you do not do one of these, the uiscrollview will not scroll because the content is all visible.
James
the content is not all visible, the uiview (that on the uiscrollview) is larger than the uiscrollview! the multitouch is enabled (via IB) and i don't know what i can do :(
JJSaccolo
A: 

it's incredible that if i try to do a new project (viewbased application), i put a view and a scrollview (bigger for scroll) and some label... it doesn't works! this should works without code, is a simple uiscrollview!!!!! :((

JJSaccolo