How can we detect the size and changes of the iPhone 14 pro dynamic-island?
Since the safe area provides a safe rectangle inside the rounded screen and top or bottom insets, but nothing about an object inside the rectangle.

First of all for most developers it is sufficient to use safeArea as we did before, because dynamic island does not cover it (if not in expanded state). There are currently 3 states of dynamic island:



You can check each state if you use dynamic island yourself as part WidgetKit. Create a new widget extension if your app doesn’t already include one. Live Activities use WidgetKit functionality and SwiftUI for their user interface. For creating new Activities, please refer to Apple official documentation for Displaying live data with Live Activities. If you are not intending to use Activities, but want to somehow be aware of dynamic island available sizes, Apple provides as with Dynamic island size sheet included in Live Activities documentation :

Here is an attachment of how safeArea looks implemented with dynamic island:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With