Reputation: 175
2 of my View controllers have a freeform size to accommodate a scrollview. When I change the View size from Iphone 7 to Ipad all my view controllers adjust size except the 2 with the Freeform size, hence the auto-layout is not working. Same when I run in the simulator. I'm new at this and would appreciate all of your help
This is my storyboard when I change the view to Ipad
Upvotes: 2
Views: 800
Reputation: 2163
They don't adjust it's size just because you set it's simulated size to freeform. That's why they ignore the type of the device you have selected on the storyboard. This attribute is only for the design purpose and should not impact your layout in any way. If you experience layout problems on iPad there probably is something wrong with your constraints.
In this post, you can find more information about the simulated size attribute. https://stackoverflow.com/a/16280477/1692080
Here you can find the direct explanation of the difference between fixed and freeform. https://stackoverflow.com/a/32820018/1692080
Upvotes: 1
Reputation: 697
You need to use autolayout to adapt your Views to the screen size. Select a view in your ViewController, click the button which is in the screenshot and Reset To Suggested Constraints below All Views in ViewController
Upvotes: 0