On Thursday, February 25, 2010 at 5:57 PM Ariel Feinerman wrote:
You calculate view`s aspect from it size, but I mean content frame (not window frame) from constant aspect, for example 4/3, then set size.
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.
This constant, used in the message, will keep the aspect ratio. Now you can (if you wish to) set an initial width of the window (e.g. in the awakeFromNib), and window height will be adjusted respectively. You don't need to store both width and height in the preferences. Just save width. Height will be adjusted automatically. At least it works for me.
Thanks. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com