Reputation: 2121
I added a UIViewController
, then in the XIB
i dragged a UIScrollView
, and a few buttons at the bottom of the page. Then when i build and ran the application, the application scrolls but the button that i added at the extreme bottom of the page can't be seen properly. So i think i will have to set a height
for the scrollview
. But where in Interfacebuilder
i should specify the height
?
If it can't be done in Interfacebuilder
, then can someone show me how to do it programatically ?
Upvotes: 0
Views: 177
Reputation: 8449
You need to set the contentSize property of the scrollview. You cannot do it in Interface Builder. You need to set it in the code of the view controller that manages the scroll view.
scrollView.contentSize = CGSizeMake(width, height);
Upvotes: 2