Post

Replies

Boosts

Views

Activity

Reply to [UIScreen mainScreen].bounds to use for Universal App
I have asked similar question before, UIScreen size looks wired if you use it in Mac: https://developer.apple.com/forums/thread/666247 In general, using UIScreen as a reference for computing your layout isn't a good idea. UIScreen represents the hardware display, and your app might only use a fractional portion of that, such as when multi-tasking on iPadOS is in use, or your app's window on macOS. Instead, your layout should size itself based on the intrinsic content size or with respect to its sibling views or the superview.
Nov ’20