© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
W. WangBeginning iPhone Development with SwiftUIhttps://doi.org/10.1007/978-1-4842-7818-5_20

20. Using GeometryReader

Wally Wang1  
(1)
San Diego, CA, USA
 

User interfaces for iOS devices must adapt to different screen sizes. Not only are there different size screens for the iPhone and iPad, but there are also different screen sizes among different iPhone and iPad models on the market. To solve this problem, SwiftUI centers user interface items, but what if you need to precisely place user interface items in specific locations?

Specific X and Y coordinates won’t work because what might look good on a large screen won’t look right on a much smaller screen and ...

Get Beginning iPhone Development with SwiftUI: Exploring the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.