Last active
April 27, 2020 09:53
-
-
Save mhdhejazi/ab142612920a7e573c8bed6f04c6faad to your computer and use it in GitHub Desktop.
Get the NSWindow from UIWindow in a Mac Catalyst app with the help of Dynamic (https://github.com/mhdhejazi/Dynamic). Credit: @steipete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIWindow { | |
var nsWindow: NSObject? { | |
Dynamic.NSApplication.sharedApplication.delegate.hostWindowForUIWindow(self) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment