Re: NSWindow - how to resize it keeping aspect ratio?
Re: NSWindow - how to resize it keeping aspect ratio?
- Subject: Re: NSWindow - how to resize it keeping aspect ratio?
- From: Ariel Feinerman <email@hidden>
- Date: Fri, 26 Feb 2010 22:17:32 +0200
It works:
in -applicationWillFinishLaunching: or other init
[win setContentAspectRatio: NSMakeSize(kWidth, kHeight)];
[win setContentSize: NSMakeSize(theWidth, theWidth * [win
contentAspectRatio])];
then aspect ratio is keeping automatically
2010/2/25 Oftenwrong Soong <email@hidden>
> On Thu, February 25, 2010 7:37:17 AM Alexander Bokovikov <
> email@hidden> wrote:
> > I don't understand what is the problem. Isn't "my" 422/674 ratio not a
> constant?
> > What is a principal difference between it and "yours" 4/3? Just
> substitute my digits
> > to whatever you need. You'll get just the same result.
>
>
> Just use the defaults system to keep this value. In the preferences pane
> for your app you can create a place for Advanced settings where someone
> could go in and change the aspect ratio if they were so inclined.
>
> Soong
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden