I use swift 2.0 for programming and I'm confused with adding more objects on view controller. For example, I need 14 buttons on my view controller with required constraints. But I'm able to add only 7 buttons one by one in my view controller on story board. Because no more place to add objects on view controller. So, How to add number of objects in view controller on story board?. Please refer following screen shots. Thanks for your help friends.
View controller on story board:
I'm able to add only 7 buttons with proper constraints. but i need to add 14 buttons with proper constraints. when view controller is scrolled then the button 8 to 14 will shown one by one respectively button 1 to 7.
Output on iPhone 5 without scroll view :
Output on iPhone 4s with scroll view:
I need like this on iPhone 5 , but 14 buttons. The 8 to 14 buttons arranged respectively 1 to 7 buttons.
You can lay this out in a Storyboard.
Click on your viewController, and then in the Size Inspector, set the Simulated Size to Freeform and set the width to
320 and the height to
1136. This will give you a tall skinny layout.
Add a scrollView to that. Size the scrollView to the full screen. Pin all four of its sides to its superView.
UIViewto the scrollView. This is your contentView. Size the content view to the full screen. Pin all four of its sides to the scrollView.
1136for the contentView.
Lay out your 14 buttons in the tall viewController.
When you run, your contentView will scroll.