Take the 2-minute tour ×

I am new at iPhone and still trying to understand everything. I added the code below but still doesn't work. Is there something special using the emulator maybe to make it scroll?

I also attached the scrollview to the SV below. I tried moving the scrollview under the text view and above it,

The several text entries I have are all on the text view

 #import <UIKit/UIKit.h>

    @interface UserEdit : UIViewController {

    IBOutlet    UIScrollView *SV;


@property(nonatomic, retain) IBOutlet UIScrollView *SV;



#import "UserEdit.h"

@implementation UserEdit

- (void)viewDidLoad {
    [super viewDidLoad];



I have read several posts on the ScrollView but I am not able to make it work.

I did this in the interface builder:

I created a UIView and put a label on it. Ran the app and that worked great.

Then I resized the UIView so it was taller than the normal window.

I placed a scroll view at the top of the tall window and also placed several more labels throughout the scroll view.

I attached the scroll view as a delegate to the file owner.

Then I ran this in the simulator and I wasn't able to scroll.

Is there something with the emulator that I need to do to make it scroll or did I do something else wrong?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

Make sure the contentSize of your scrollview is larger. refer this post for help.

Scrollview doesnt need to scroll if the contents it needs to display fits in its frame.

share|improve this answer
thanks for the help and the link... –  Mark Worsnop May 17 '11 at 8:46

You will need to adjust the content size of the scrollview property to the taller view size.

share|improve this answer

You need to set the contentSize property of the scrollview. Set this value to the total height and width of the views contained in the scrollview. You set this property only via code and not in Interface Builder.

share|improve this answer

Your Answer


