Geek20
Geek20

Reputation: 713

Change NSWindow size with Storyboard

I'm new using Storyboards for OS X and I can't find the way to change the Window size from my NSViewController

I tried

var window = self.view.window!
...
window.setFrame(frame, display: true, animate: animation)

but it doesn't work: enter image description here

Upvotes: 2

Views: 882

Answers (1)

Prontto
Prontto

Reputation: 1681

That should work. Are you sure you don't have same frame what your window's frame currently is? If so, this should work:

let window = self.view.window!
window.setFrame(NSRect(x: 100, y: 100, width: 400, height: 400), display: true, animate: true)

Upvotes: 3

Related Questions