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

Component not working with UIScene #117

Open
ppamorim opened this issue Jan 13, 2020 · 0 comments
Open

Component not working with UIScene #117

ppamorim opened this issue Jan 13, 2020 · 0 comments

Comments

@ppamorim
Copy link

If this component is not drawing in your UIScene based application, simply change this line here:

https://github.com/cezarywojcik/CWStatusBarNotification/blob/swift/CWStatusBarNotification/CWStatusBarNotification/CWStatusBarNotification.swift#L267

With:

if #available(iOS 13.0, *) {
    if let firstScene: UIWindowScene = UIApplication.shared
    .connectedScenes.filter({ $0.activationState == .foregroundActive })
    .first as? UIWindowScene {
        self.notificationWindow = CWWindowContainer(windowScene: firstScene)
    }
} else {
    self.notificationWindow = CWWindowContainer(frame: UIScreen.main.bounds)
}
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

1 participant