Re: Issue with NSView setFrame
Re: Issue with NSView setFrame
- Subject: Re: Issue with NSView setFrame
- From: Dave Keck <email@hidden>
- Date: Mon, 12 Oct 2009 11:59:25 -1000
> Thank you, that helps a lot. How would I get a reference to the previous
> NSView object?
On your mouseEntered, send a message to some controlling object - let's call
it MyViewController:
- (void)mouseEntered:(NSEvent *)theEvent
{
[myViewController mouseDidEnterView: self];
}
- (void)mouseExited:(NSEvent *)theEvent
{
[myViewController mouseDidEnterView: nil];
}
... and in MyViewController's mouseDidEnterView:
- (void)mouseDidEnterView: (NSView *)newMouseOverView
{
if (mouseOverView)
{
[[mouseOverView animator] setFrame: oldMouseOverViewFrame];
}
mouseOverView = newMouseOverView;
if (mouseOverView)
{
oldMouseOverViewFrame = [mouseOverView frame];
[[mouseOverView animator] setFrame: magnifiedFrame];
}
}
Untested, etc.
_______________________________________________
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