Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fabrum

macrumors member
Original poster
Jan 15, 2021
48
3
How do I make scroll views fit both ipad and iphone screens? I made the scroll view 1100 by 800; however, although this works fine for all the iphone screens and the ipad screens including the 9.7 inch diameter screen - anything larger has a massive white space. How do I fix that? thanks
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
you made the size of the View a fixed pixel size? I recommend you look into Auto Layout, Layout Constraints and size things dynamically rather than using fixed values.
How did you make your views? Storyboard? Programmatically with UIKit? I don't assume this is SwiftUI.
 

fabrum

macrumors member
Original poster
Jan 15, 2021
48
3
Thanks for replying. I solved the issue by using fixed values for the constraints. What happens is that the user will then drag his finger across the screen to see more of the entire view. The entire view is too big to fit on iPhone sized screens although you can see the entire view on iPad screens.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.