Auto Resize Views Issues
Auto Resize Views Issues
- Subject: Auto Resize Views Issues
- From: "Rama Krishna" <email@hidden>
- Date: Tue, 7 Apr 2009 09:56:15 -0400
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 (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