-
Notifications
You must be signed in to change notification settings - Fork 37
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
Big Sur breaks code #7
Comments
Yeah, extension UIWindow {
var nsWindow: NSObject? {
var nsWindow = Dynamic.NSApplication.sharedApplication.delegate.hostWindowForUIWindow(self)
if #available(macOS 11, *) {
nsWindow = nsWindow.attachedWindow
}
return nsWindow.asObject
}
} Let me know if it works for you. |
Adding the I ended up with this for now:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code (use to position and size the main window after launch) now crashes
delay(0.1) {
let ns = self.window?.nsWindow
Dynamic(ns!).setFrame(CGRect(200,200,1200,800), display: true)
let frame = Dynamic(ns!).frame.asCGRect!
let size = frame.size
Dynamic(ns!).setAspectRatio(CGSize(1.0, size.height/size.width))
}
with the following error
2020-11-17 21:42:22.832850-0600 ChordCalc Mac[11229:361126] Metal API Validation Enabled
WARNING: Trying to access an unrecognized member: UINSWindowProxy.setFrame:display:
The text was updated successfully, but these errors were encountered: