Re: How can a view know when its superview changes sizes?
Re: How can a view know when its superview changes sizes?
- Subject: Re: How can a view know when its superview changes sizes?
- From: Shawn Erickson <email@hidden>
- Date: Tue, 26 Apr 2005 11:40:57 -0700
On Apr 26, 2005, at 11:25 AM, Sean McBride wrote:
Hi,
I have a custom NSView that needs to change its size when its superview
changes sizes. Alas, I can't use the autoresizing springs in this
situation, because the size change needed is complicated.
How can a view know when its superview changes sizes?
I've found resizeWithOldSuperviewSize: and implemented it with an
NSLog,
but it seems to never be called.
It seems like this should be simple...
Consider NSViewBoundsDidChangeNotification or assuming you are dealing
with a subclassing of NSView then as you noted override
resizeWithOldSuperviewSize:. You should get this message if the
super-view has auto-resizing enabled (see setAutoresizesSubviews:).
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden