Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The position of the banner on the screen when changing orientation #404

Open
oleg-samoylov-ext-orion opened this issue Feb 7, 2023 · 2 comments

Comments

@oleg-samoylov-ext-orion
Copy link

oleg-samoylov-ext-orion commented Feb 7, 2023

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:

RPReplay_Final1675783622.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)
@thehamesu
Copy link

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

@amgallo272
Copy link

Same issue. any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants