开发者

Animating a View Like This Example

I am facing a problem when trying to animate a view. When the user clicks on the advanced search button, it is navigating this view and the animation starts, but it is not correct. How can I animate a view when the user clicks on the advanced search button?

(I want to make this type of animation : )

http://d2o0t5hpnwv4c1.cloudfront.net/041_TopPanelWithJquery/demo/index.html

Are there any good tutor开发者_Go百科ials that will help me in this matter?


Some existing code from a comment

AddSearchView.frame = CGRectMake(10, 65, 310, 148);
//CGRectMake(0, 0, 320, 480);
[self.view addSubview:AddSearchView];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:0.8];
AddSearchView.frame = CGRectMake(10, 57, 310, 148);
//CGRectMake(0, 480, 320, 480);
[UIView commitAnimations]; 


You can use UIView's setAnimationDidStopSelector method to call another function once the current animation is complete. I have used this to link animations which heavy relied on timing. For that particular animation, I would try animating the UIView's frame property.

Also consider using CAKeyframeAnimation. http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAKeyframeAnimation_class/Introduction/Introduction.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜