Implementing a dynamic top banner similar to Spotify's offline mode indicator

I’m trying to recreate the UI effect that Spotify uses when switching to offline mode. They display what looks like an expanded status bar area, but I think they’re actually adding a custom view underneath and adjusting all the view controllers accordingly.

I’ve attempted several approaches including creating custom subclasses of UINavigationController and UIWindow, and even trying to modify the window frame size. However, none of these methods work consistently across all scenarios in my app.

What’s particularly impressive about Spotify’s implementation is that it continues to function properly even when system view controllers are presented modally. For example, when MFMailComposeViewController appears, the top banner remains visible and properly positioned.

Has anyone successfully implemented a similar global banner system that works with both custom and system view controllers?

honestly, the easiest way i’ve found is using a separate window with a higher window level. create a new UIWindow, set its windowLevel to something like UIWindowLevelStatusBar + 1, then just show/hide your banner view there. works great with modal controllers too since it’s completely independent from your main app window.