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

Support for IOS13 #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support for IOS13 #98

wants to merge 1 commit into from

Conversation

yawboafo
Copy link

@yawboafo yawboafo commented Oct 1, 2019

No description provided.


if #available(iOS 13.0, *) {
if let currentWindowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
guard let window = currentWindowScene.windows.first else { fatalError() }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it safe to use first window? maybe filter it to get the key window?

guard let window = appDelegate.window else { fatalError() }
window?.addSubview(self)
window?.bringSubviewToFront(self)
window?.endEditing(true)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is copy pasted code from above, how about extracting it?

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

Successfully merging this pull request may close these issues.

3 participants