Closed matthew-carroll closed 1 year ago
Is there currently a set of APIs that makes it possible to set the size of the window and place it at the center of the screen?
If not, it would be great to have those APIs. I'm trying to control the initial launch of the app to center a window of a particular window size.
There currently is not, but implementing such functionality shouldn’t be too difficult.
Apparently, NSWindow has a center method which does exactly that, however, I’d argue that it’d be best to go all the way and offer methods to modify the window’s frame, thus allowing the window to be placed at arbitrary positions.
NSWindow
center
frame
Excuse the delay. This feature is now impelemted.
Is there currently a set of APIs that makes it possible to set the size of the window and place it at the center of the screen?
If not, it would be great to have those APIs. I'm trying to control the initial launch of the app to center a window of a particular window size.