I'm using the curlup and curldown animation开发者_运维百科 that works great. My problem is my view is still present for a second before it pushes the viewcontroller. How do I hide current view when animation ends?
Hope this code will help to u....
once check it..... .
when your animation completed at that time "customView" frame sizes are set (x,y,0,0).... like below
-(void)close_but{
CGRect viewTopFrame = CGRectMake(150,240,0,0);
[UIView animateWithDuration:0.5
delay:0
options: UIViewAnimationCurveEaseOut
animations:^{
"customView".frame = viewTopFrame;
}
completion:^(BOOL finished){
NSLog(@"Done!");
}];
customView.frame=viewTopFrame;
you can set the view's alpha to to 0 once animation is complete like:
[customView setAlpha:0];
精彩评论