Really weird issue, i've got a view (view 2) that i'm popping to bring up my main view (view 1) which has an animated background. Once i pop from view 2, view 1 loses those animations... the weird thing is that moving the iOS status bar in the slightest will restart them!

Any ideas?

This is the code that i'm using to pop the view. If I pop the view without animations, it works fine.

-(IBAction)popOnSwipe {
[UIView beginAnimations:@"" context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationCurve:UIViewAnimationTransitionCurlDown];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO];
[navController popViewControllerAnimated:NO];
[UIView commitAnimations];

One more thing; the animation starts back up on the simulator, but not on the iTouch i'm testing it on. Any insight would be greatly appreciated,

thanks!

有帮助吗?

解决方案 2

The device I was using was faulty, the method works fine on my other devices. Thanks for the help.

其他提示

Add your animations for view1 in DidStopSelector method like,

-(IBAction)popOnSwipe 
{
[UIView beginAnimations:@"" context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationCurve:UIViewAnimationTransitionCurlDown];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO];
[UIView setAnimationDidStopSelector:@selector(view1_animation)];//add this line
[navController popViewControllerAnimated:NO];
[UIView commitAnimations];
}
-(void)view1_animation
{
  //do animations for view1
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top