NotificationBanner
NotificationBanner copied to clipboard
The position of the banner on the screen when changing orientation
My app supports only the portrait mode. However, if I rotate the device (in real life), a banner will appear in wrong coordinates.
Look at the video:
https://user-images.githubusercontent.com/105489738/217288970-2d3c8809-33d1-4481-8b30-bd79437a8459.mov
How can I deal with it and always keep the banner at the bottom?
My code:
let queue = NotificationBannerQueue()
MyAppDelegate.internetBanner = StatusBarNotificationBanner(title: MyStore.shared.whTemplate?.internet_diconnected_text ?? "Internet is not connected", style: .danger)
...
// case 1
MyAppDelegate.internetBanner?.dismiss()
let banner = StatusBarNotificationBanner(title: title, style: .success)
banner.duration = 0.5
banner.show(queuePosition: .front, bannerPosition: .bottom, queue: queue, on: nil)
...
// case 2
let banner = MyAppDelegate.internetBanner
banner.autoDismiss = false
banner.show(queuePosition: .front, bannerPosition: .bottom, queue: queue, on: nil)
Same problem here, anybody knows how to fix that problem? Thank you!
Same issue. any solutions?