Closed aman-at-appinventiv closed 3 years ago
+1
Hey Guys, It's been a while, does anyone have a solution for this.
Thanks in advance.
@aman836 Could you provide a video/gif of what you are experiencing please along with the code snippet you are using to show the banner? I'm not able to reproduce the issue currently.
@Daltron Thank you for responding, please find the code snippet and GIF attached below. 😊
private var banner: StatusBarNotificationBanner? = nil
func updateBanner(withStatus status: String) {
switch status {
case "connected":
banner?.dismiss()
banner = StatusBarNotificationBanner(title: "You're back on!", style: .success)
banner?.show()
case "connecting":
banner?.dismiss()
banner = StatusBarNotificationBanner(title: "Connecting...", style: .warning)
banner?.autoDismiss = false
banner?.show()
case "disconnected":
banner?.dismiss()
banner = StatusBarNotificationBanner(title: "You are offline", style: .danger)
banner?.autoDismiss = false
banner?.show()
case "notConnected":
banner?.dismiss()
banner = StatusBarNotificationBanner(title: "You are offline", style: .danger)
banner?.autoDismiss = false
banner?.show()
case "syncing":
banner?.dismiss()
banner = StatusBarNotificationBanner(title: "Syncing...", style: .info)
banner?.autoDismiss = false
banner?.show()
default:
break
}
}
Thanks for the GIF @aman836! I was able to reproduce the issue and this should now be fixed in the 3.0.6 release! Thank you for reporting this!
My app does not support landscape mode and still if the user tilts their phone in any direction the label inside the StatusBarNotificationBanners moves itself from the centre to the right corner of the banner.
The banner does not have more than 2 words at any given time and this is how it is being initialised StatusBarNotificationBanner(title: "Connecting...", style: .warning)
Pod version 3.0.2 The issue can be reproduced on any device with iOS 12 and above.