• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWindow - how to resize it keeping aspect ratio?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSWindow - how to resize it keeping aspect ratio? (From: "Alexander Bokovikov" <email@hidden>)
 >Re: NSWindow - how to resize it keeping aspect ratio? (From: Eric Gorr <email@hidden>)
 >Re: NSWindow - how to resize it keeping aspect ratio? (From: Ariel Feinerman <email@hidden>)
 >Re: NSWindow - how to resize it keeping aspect ratio? (From: Alexander Bokovikov <email@hidden>)
 >Re: NSWindow - how to resize it keeping aspect ratio? (From: Ariel Feinerman <email@hidden>)
 >Re: NSWindow - how to resize it keeping aspect ratio? (From: "Alexander Bokovikov" <email@hidden>)
 >Re: NSWindow - how to resize it keeping aspect ratio? (From: Oftenwrong Soong <email@hidden>)

  • Prev by Date: Re: High Level Toolkit -- is it obsolete or not?
  • Next by Date: Layer-backed view issue with isOpaque
  • Previous by thread: Re: NSWindow - how to resize it keeping aspect ratio?
  • Next by thread: NSTableView with PopUpButtonCell column with different content per row
  • Index(es):
    • Date
    • Thread