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: John Brownlow <email@hidden>
- Date: Tue, 26 Apr 2005 14:37:56 -0400
you just subscribe to 'NSViewFrameDidChangeNotification's that the
superview's size changed, whether in the custom NSView itself or more
likely an NSWindowController subclass that is managing both of them.
I do this to keep a page layout centered in a wider superview.
On Apr 26, 2005, at 2:25 PM, 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...
Thanks!
--
John Brownlow
Deep Fried Films, Inc
http://www.johnbrownlow.com
http://www.pinkheadedbug.com
_______________________________________________
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