-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
Banner shows under status bar #56
Comments
in BaseNotificationBanner.swift if let parentViewController = parentViewController {
parentViewController.view.addSubview(self)
if statusBarShouldBeShown() {
appWindow.windowLevel = UIWindowLevelStatusBar + 1
}
} else {
appWindow.addSubview(self)
if statusBarShouldBeShown() && !(parentViewController == nil && bannerPosition == .top) {
appWindow.windowLevel = UIWindowLevelStatusBar + 1
} else {
appWindow.windowLevel = UIWindowLevelStatusBar + 1
}
} I changed the above to if let parentViewController = parentViewController {
parentViewController.view.addSubview(self)
if statusBarShouldBeShown() {
appWindow.windowLevel = UIWindowLevelNormal
}
} else {
appWindow.addSubview(self)
if statusBarShouldBeShown() && !(parentViewController == nil && bannerPosition == .top) {
appWindow.windowLevel = UIWindowLevelNormal
} else {
appWindow.windowLevel = UIWindowLevelStatusBar + 1
}
} and now its on top, but I'm not sure if thats correct. |
Hi @trianglepixel! 😄 There is no need to change the code for what you are wanting to do. As the README states: By default, each banner will be displayed on the main application window. If you are wanting to show a banner below a navigation bar, simply show on the view controller that is within the navigation system: banner.show(on: viewController) So what you need to do is forgo the |
@Daltron Yes I see the issue now. Thanks. |
Both NotificationBanner & StatusBarNotificationBanner show underneath status bar.
The text was updated successfully, but these errors were encountered: