spentak
spentak

Reputation: 4727

Mac Autoresize NSView Keep Aspect Ratio

I have code that keeps my main window in its respective aspect ratio when the user resizes it. (using windowWillResize delegate method) I have some subviews of that window that I also want to keep at their own aspect ratios. How do I do this?

Upvotes: 1

Views: 662

Answers (1)

Caleb
Caleb

Reputation: 124997

Sounds like you should start by looking at -resizeWithOldSuperviewSize:, documented thus:

Informs the receiver that the bounds size of its superview has changed.

Upvotes: 2

Related Questions