Reputation: 71
I'm currently trying to make constraint work in both portrait and landscape view.
I started out putting controls to an iPad Pro 9.7 inch portrait view:
With a hierarchy:
I had to put two views to force it to center when the user switches to landscape view. I was able to center it but it seemed that scrolling won't work properly. I have to scroll up to see the upper part but once I release, it goes back to that position again.
Is there a way to solve this using the storyboard? I tried everything like:
-Top space, leading space, trailing space, bottom space, centerX, centerY to - but it became unscrollable
Upvotes: 0
Views: 339
Reputation: 980
I have done it in two way.
Using Stack View.
Scroll View as your requirement.
I have added the image and all the design are done in storyboard so I am giving you git link
. Demo Project Link
Hope it will help for you.
Upvotes: 1