I created a view in Nib file containing several sub views/controls. I
enabled auto resizing for these controls by configuring appropriate struts
and springs in the Interface Builder's size inspector. This view is loaded
and added to an NSBox on an as required basis. Everything works fine. When
the view is added to the Box I want to animate it starting with a zero size
to the actual size of the NSBox.

So I wrote code like this (given below is a simplified version of the actual
code):

NSView* view = [viewController view];
[box setContentView:view];
[view setFrame:[self zeroSizeRectangleAtCenterOfTheBox]];
[self performSelector:@selector(animatedResize) withObject:nil afterDelay:0]

The animatedResize method looks like this:

-(void)animatedResize
{
   [[[viewController view] animator]:setFrame:[box bounds]];
}

I get the animation all right. However all the sub view sizing and layout is
disturbed. Some views appear above other views and so on. 

What is the proper way to animate a view from zero size to the desired size?


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to