Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I "enable" scrolling up and down in a UIViewController

Ok, I have a navigation Controller that manages a drilldown tableview, when it reaches to the end it show a list of products, when you choose a product it will show a detail view (UiViewController).

What I want to know is how to "Enable" scrolling up and down in that detail view so i can show full information about the product to the user.

Thanks

like image 823
Zulu22 Avatar asked Mar 31 '13 22:03

Zulu22


2 Answers

Got the answer. If you are using Storyboards (like myself) you have to go to the attributes inspector of the UiViewController and change the size parameter to freeform, then select the UIView of the UIViewController and in the size inspector choose whatever width or height you want and finally grab the Scroll View from the object library and insert it.

like image 113
Zulu22 Avatar answered Oct 03 '22 06:10

Zulu22


You need to add an UIScrollView to the view controller's view, and set its contentSize.

like image 23
Marcelo Fabri Avatar answered Oct 03 '22 05:10

Marcelo Fabri