I have a UIViewController with a view hooked up to a UIView nib file. I embedded everything in the view within a UIScrollView. Then I added an IBOutlet UIScrollView property to the view controller, made the UIViewController a UIScrollViewDelegate and hooked the two up both directions. Finally, I coded the scrollviews contentsize to be 2x the height. It still will not scroll. Suggestions?
0
votes
2 Answers
1
votes
Take a look at the reference: https://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html
- set scrollEnabled to YES
- set the height of the content in the scroll view: contentSize
0
votes
inside the nib file set the ScrollView to 320 x 480 but in the viewDidLoad set it like this :
scroll.delegate = self;
scroll.ContentSize = CGSizeMake(320, 480*2);
scroll.ScrollEnabled = YES;
also make sure that in the .h file you did this :
@interface myProject : UIViewController <UIScrollViewDelegate>{