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;
@end
//
#import "UserEdit.h"
@implementation UserEdit
- (void)viewDidLoad {
[super viewDidLoad];
SV.contentSize=CGSizeMake(320,950);
}
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?
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.