Resizing NSWindows and NSViews with NSViewAnimation
Resizing NSWindows and NSViews with NSViewAnimation
- Subject: Resizing NSWindows and NSViews with NSViewAnimation
- From: Sanford Selznick <email@hidden>
- Date: Wed, 17 Oct 2007 16:17:03 -0700
Hello,
I have an NSWindow with multiple views in it. In response to a
user action I (1) resize one view, (2) move some other views, and (3)
resize the window to snug-fit the result.
My views are all springed only at the bottom and right to peg them
to the upper left corner of the window.
My window resizes fine manually. (The views stay pegged.)
When I put my NSViews and my NSWindow in to the same
NSViewAnimation array, my objects end up all over the place. If I
remove the NSWindow from the animation, it works fine.
I've read the documentation at
<http://developer.apple.com/documentation/Cocoa/Conceptual/AnimationGuide/Articles/ViewAnimations.html>
When I add the NSWindow, I've tried using [window frame] and
[NSWindow contentRectForFrameRect:[window frame] styleMask:[window
styleMask]]. Neither work.
Is there a trick to moving and resizing views while also resizing
the window? It's as if the origin is getting messed up as the window
resizes and the animation is getting confused.
Thanks,
Sanford
_______________________________________________
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