Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Phantom1812

macrumors newbie
Original poster
Jul 20, 2010
29
0
I am probably doing an incredibly stupid new-kid thing here, but I have a function that is called that fades and moves a UIView (sub-view on a parent UIViewController) on to the screen (and another function which moves it off). Everything works great, however after I am finished with the parent UIViewController and release it, everything I do in OTHER UIViewControllers after that, animates!! So things which have no animate block around them and have no connecion to the UIViewController or UIView that was being animated, all move and fade as if they are attached to the animation block.

Any ideas why animating one UIView, then causes everything else on my application to animate thereafter?

Below is the function that is called to animate a view :

Code:
-(void)animateQuestionOnFromRight:(UIView *)questionView {


[UIView beginAnimations:nil context:NULL];

questionView.alpha = 0.0;

questionView.hidden = NO;
[UIView beginAnimations:@"controlViewTransition" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];  
[UIView setAnimationDuration:0.40];
questionView.alpha = 1.0;
[UIView commitAnimations];


questionView.frame = CGRectMake(1024, 69, 800, 610);
questionView.hidden = NO;
[UIView beginAnimations:@"controlViewTransition" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];  
[UIView setAnimationDuration:0.40];
questionView.frame = CGRectMake(112, 69, 800, 610);
[UIView commitAnimations];


}


Nothing more complicated than that I simply pass the UIView as an object into the function (questionView) and that is applied.


Feel free to mock if I'm doing something stupid. :eek:)
 
looks like you ar missing a commitAnimation message at the end there.
 
You have one animation loop, correct? One that both fades and moves the view simultaneously? If that's the case, why do you have three [UIView beginAnimations:context:] calls?
 
You have one animation loop, correct? One that both fades and moves the view simultaneously? If that's the case, why do you have three [UIView beginAnimations:context:] calls?

Why have one when you can have 3?? :)

I will try cleaning the function up and trying again. Cheers for the pointer.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.