Re: Keeping NSView square
Re: Keeping NSView square
- Subject: Re: Keeping NSView square
- From: Andrew Farmer <email@hidden>
- Date: Wed, 18 Nov 2009 22:32:40 -0800
On 18 Nov 2009, at 04:38, Henri Häkkinen wrote:
> I'm making a custom NSView derived class and I need the view to have a fixed width/height ratio at all times, specifically I would like the view to stay square. I am trying to override the setFrame: method like this...
Don't. Arbitrarily changing the size of your view in setFrame: makes AppKit lose track of what size your view was, making it impossible to restore the original size later. Cut the view down to square at draw time instead._______________________________________________
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