How to position the window of the app from the beginning, when the app launches?
This works well if I put in a button:
@IBActionfunc test(_ sender: NSButton) {
view.window?.setFrame(NSRect(x:0,y:0,width:500,height:500), display: true)
}
But it does not work if I put in the viewDidLoad or ViewDidAppear:
overridefunc viewDidLoad() {
super.viewDidLoad()
view.window?.setFrame(NSRect(x:0,y:0,width:500,height:500), display: true)
}