I have a really big problem with UIScrollView. To make sure it wasn't my actual project, I created a NEW project, iPhone only, for iOS 6 and 7. I disabled autolayout.
- I created a Tab Bar project
- I created a view controller, embedded it in a navigation controller and connected it as Tab bar item #0
- I put a UIScrollView in my view.
- I connected the scrollview in the custom UIViewController created for this view.
- I synthesized my IBOutlet and set the delegate to self. I also implemented delegate in .h
Here is my code (ViewDidLoad):
self.scrollView.delegate = self;
[self.scrollView setScrollEnabled:YES];
[self.scrollView setContentSize:CGSizeMake(self.view.frame.size.width, 20000)];
NSLog(@"contentSize width %f", self.scrollView.contentSize.width);
NSLog(@"contentSize height %f", self.scrollView.contentSize.height);
NSLog(@"%@", NSStringFromCGAffineTransform(self.scrollView.transform));
It returns me "contentSize width 20000.000000", "contentSize height 0.000000 " and "[1, 0, 0, 1, 0, 0]". It scrolls left-right where it should scroll up-down
Please help!