NotificationBanner icon indicating copy to clipboard operation
NotificationBanner copied to clipboard

The position of the banner on the screen when changing orientation

Open oleg-samoylov-ext-orion opened this issue 3 years ago • 2 comments

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)

oleg-samoylov-ext-orion avatar Feb 07 '23 15:02 oleg-samoylov-ext-orion

Same problem here, anybody knows how to fix that problem? Thank you!

thehamesu avatar Apr 03 '23 01:04 thehamesu

Same issue. any solutions?

amgallo272 avatar Feb 23 '24 20:02 amgallo272