When creating a fullscreen share extension, is there a way to control the status bar?
I tried:
Nothing seems to affect the status bar, it is just inherited from the view that opened the share extension. Is there a workaround or is that by design how it must work?
If you have preferredStatusBarStyle returning a different preferred status bar style based on something that changes inside of your view controller (for example, whether the scroll position or whether a displayed image is dark), then you will want to call setNeedsStatusBarAppearanceUpdate() when that state changes.
The icons in the status bar at the top of the screen provide information about iPhone. On an iPhone with Face ID, there are additional status icons at the top of Control Center.
preferredStatusBarStyle (doc) - The preferred status bar style for the view controller. Subclass or extend UINavigationController class MyNavigationController: UINavigationController { override var preferredStatusBarStyle: UIStatusBarStyle { .lightContent } }
There's currently no way to change the status bar style for an extension view (http://openradar.appspot.com/radar?id=6397505050771456). It seems like the status bar for the extension uses the same style as the app that called the extension.
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