Jonah Siegle
Jonah Siegle

Reputation: 31

NSWindow resize limit

I'm trying to create a resize limit for my NSWindow. I don't want the window to scale smaller than 732x or 496y pixels. What would be the best way to go about doing this?

Upvotes: 1

Views: 610

Answers (2)

Christian Schnorr
Christian Schnorr

Reputation: 10776

In code you would do it like this:

window.contentMinSize = NSMakeSize(320.0, 568.0);

Upvotes: 1

Zrb0529
Zrb0529

Reputation: 800

In Xcode click the .xib file and then select your window. In the utilities tray click the size inspector and check the box next to Minimum Size Constraints and set the size

Upvotes: 3

Related Questions