Reputation: 2997
I want to display a banner notification with a dark background and light text. iOS naturally does this if the phone is using dark mode. However, in light mode, when I use WhatsApp, I noticed banners have a dark theme as long as they are displayed while the application is in the foreground.
How can I create something similar? I've been looking into using UNNotificationContentExtension
. This seems to work for custom actions displayed via a long click. For example, when I set view.backgroundColor
, this does not set the background color for the whole banner. It only does it for custom actions.
Upvotes: -1
Views: 409
Reputation: 1
This isn't possible, since the system manages the creation of these alerts. This is probably restricted for consistent UI.
Upvotes: 0