3 ms·
Safe area can account for things that are not just a notch. It's used across Apple platforms to indicate anything that might need to occupy a dedicated region o
by interpol_p 1y ago
Safe area can account for things that are not just a notch. It's used across Apple platforms to indicate anything that might need to occupy a dedicated region on the screen: notch on iPhones, home indicator, iPadOS traffic light buttons, menu bar, curved edges of displays, and so on
Your container views can extend the safe areas for their children as well. In our apps, which allow users to run their own custom projects, we increase the safe area for our UI so that users can avoid it in their own rendering
Safe area is a fairly neat and functional API. The unfortunate thing is the older `CGDisplayCopyAllDisplayModes` API is just lumping all resolutions together
- eviks 1y agoEven then, you can still have something descriptive like unobstructed_area for more general cases. "Safety" is too generic But also you don't need to degrade Mac dev experience for games to tackle ipads the games will not be developed on, aliases exist
- dkiebd 1y agoHow is unobstructed area, a term you just made up, better than safe area, a term that has been standard for decades?
- eviks 1y agoThat's obvious: the descriptive term is obvious in what it represents on your screen, so has a low cognitive overload for all the new generations of people learning these APIs. Encoding bad practices for decades, on the other hand, just reflects the pains of the old generations.