I've been struggling with this all morning for more than 3 hours now and I'm literally going insane!
I'm creating a Storyboard app for iOS 6 using Xcode 4.6. I dragged and dropped a UIScrollView
to a ViewController. After designing the viewable part of the Scroll view, using its handles I stretched it vertically and pushed it up a bit so that that part is visible for me to design the rest of the screen. After I was done I positioned the scroll view back to fit the view. But I did not resize the scroll view to match the size of the view from the IB.
I added the following line of code in the viewDidLayoutSubviews
method (Used that method instead of viewDidLoad
because of Chris' comment here).
self.scrollView.contentSize = self.view.frame.size;
The code gets executed but the scroll bars won't appear and it scrolling does not work at all! I went through almost all the questions and answers here on SO regarding this and tried everything but to no avail.
I attached the runnable Xcode project here as well.
Please tell me what I should do to get this working. I'm eternally frustrated with Apple.
Thank you.