On 19 Nov 2009, at 00:10, Kyle Sluder wrote:
> 2009/11/18 Andrew Farmer <andf...@gmail.com>:
>> 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.
> 
> This sounds like an even worse idea.

To be more specific - I wasn't suggesting adjusting the size of the view at 
draw time, or refusing to draw the entire dirty rect, but simply performing the 
min(frame width, frame height) calculation at draw time and drawing the view's 
content into the minimized rect. -resizeWithOldSuperviewSize: sounds like an 
excellent alternative, though, and probably more 
on-target._______________________________________________

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

Reply via email to