Re: resizing window containing NSView with CALayer
Re: resizing window containing NSView with CALayer
- Subject: Re: resizing window containing NSView with CALayer
- From: Graham Cox <email@hidden>
- Date: Mon, 08 Aug 2011 22:23:23 +1000
On 08/08/2011, at 9:35 PM, julius wrote:
> When I go and drag the resize handle to make the window as small as I can make it, i.e. so the window's content rect has zero height then the view misbehaves, i.e. the top of the view shifts from being some 100 pixels below the title bar to being 0 pixels below it!
Ummm, well, that's not what you said was going on originally. This is normal.
The reason this happens is that once either the width or height goes to 0, there's nothing for the view sizing code to mutliply by to end up with the destination size - once you hit a zero, the sizing information is lost. To prevent this, set a minimum size on the window. This is a good idea in any case - there is no possible use for a zero-sized window.
--Graham
_______________________________________________
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