iOS Animation jumps to endstate in specific XIB

98 views Asked by At

I tried to find a solution for it for a while now.

I have a XIB called CameraViewController.xib. I have a few animations in it. (Alpha, Scale, Transition) I use AutoLayout and Interface Builder, xCode 6 and Objective C. (iPhone)

Every animation worked fine until 2 weeks ago they just stopped working. I can´t figure out why. Every animation is ignored and jumps directly to endstate.

It´s just in this XIB in all other XIBs and my Storyboards ViewControllers every animation is working fine.

There is no Error. I tried all possible forms of animating down to CoreAnimations but they all jump to endstate.

The XIB is complex and it has a lot of code in it. I don´t want to build the XIB again trying and trying until I find the mistake.

Anybody got the same problem or an idea ? Or a link for me where I can find out why animations aborting and jumping ?

This is driving me crazy...

EDIT :

[UIView animateWithDuration:0.5f
                         animations:^{
                             liveLabel.alpha = 0.7;
                             liveRedDot.alpha = 1.0;
                         }
                         completion:^(BOOL finished){
                             nil;
                         }];

CABasicAnimation *morph = [CABasicAnimation animationWithKeyPath:@"cornerRadius"];
morph.fromValue = @0;
morph.toValue = @37.5;
morph.duration = 0.5;
[playStopButton.layer addAnimation:morph forKey:@"morph"];

I also tried different code snippets for the same animation but not a single one is working. As I said same code is working in other XIBs or ViewControllers of my StoryBoard :

[UIView animateWithDuration:0.5 animations:^{
    playStopButton.transform = CGAffineTransformMakeScale(0.6,0.6);
    playStopButton.backgroundColor = UIColorFromRGBWithAlpha(0x000000,0.3);
}];

[UIView beginAnimations:@"button" context:nil];
[UIView setAnimationDuration:0.5];
    playStopButton.transform = CGAffineTransformMakeScale(0.6,0.6);
    playStopButton.backgroundColor = UIColorFromRGBWithAlpha(0x000000,0.3);
[UIView commitAnimations];

[UIView
 animateWithDuration:0.5
 delay:0.0
 options:UIViewAnimationOptionCurveEaseInOut
 animations:^{
     playStopButton.transform = CGAffineTransformMakeScale(0.6, 0.6);
 }
 completion:nil];
0

There are 0 answers