Μήτσος
Μήτσος

Reputation: 221

IOS 6 UIView animation completion

Any idea why the following code does not working under IOS 6, while it runs perfectly under IOS 5 executing the NSLog but on IOS 6 (both in simulator and iPad) the NSLog does not executed at all!

[UIView animateWithDuration: 2.0f animations:^{ [self.view setAlpha:0.7f];}
                 completion:^(BOOL finished){ if(finished)  NSLog(@"Finished !!!!!!");}];

Upvotes: 2

Views: 8469

Answers (1)

Mohammad Kamar Shad
Mohammad Kamar Shad

Reputation: 6067

Here the Code

  [UIView animateWithDuration:2.0
                      delay:0.0
                    options: UIViewAnimationOptionCurveEaseInOut
                 animations:^{
                    [self.view setAlpha:0.7f];

                 }
                 completion:^(BOOL finished){
                     if(finished)  NSLog(@"Finished !!!!!");
                     // do any stuff here if you want
                 }];

Upvotes: 8

Related Questions