Here is what I have done.
I have a standard viewController in the storyboard set to 3.5inch display. Then i drag in a view make it the full size of the screen and set its colour to blue. I drag in a button to the view and set a single constraint
- bottom space to bottom layout guide = 20
I run this in the simulator using a 4 inch screen and the view has automatically expanded to fit the whole size and the button has moved to the bottom of the larger screen with it . Great.
Now I add a scrollview I set the it to pin top and bottom. I create a button and place it at the bottom of the scrollview and set it to pin bottom (the bottom constraint distance). When I run it the scrollview scales and increases in size to fit the 4 inch screen BUT the button stays where it is.
Any ideas how I can get the bottom to stay pinned to the bottom of the scrollview as it scales?
I have a standard viewController in the storyboard set to 3.5inch display. Then i drag in a view make it the full size of the screen and set its colour to blue. I drag in a button to the view and set a single constraint
- bottom space to bottom layout guide = 20
I run this in the simulator using a 4 inch screen and the view has automatically expanded to fit the whole size and the button has moved to the bottom of the larger screen with it . Great.
Now I add a scrollview I set the it to pin top and bottom. I create a button and place it at the bottom of the scrollview and set it to pin bottom (the bottom constraint distance). When I run it the scrollview scales and increases in size to fit the 4 inch screen BUT the button stays where it is.
Any ideas how I can get the bottom to stay pinned to the bottom of the scrollview as it scales?
Last edited: