I want to run a block of code after an animation is completed but the compiler shows the following error : "Incompatible block pointer types sending 'void (^)(void)' to parameter of type 'void (^)(BOOL)'"
Here is my code, I am not sure what I am doing wrong, please help, thanks.
[UIView transitionWithView:self.view duration:1.5
options:UIViewAnimationOptionTransitionFlipFromBottom //change to whatever animation you like
animations:^ {
[self.view addSubview:myImageView1];
[self.view addSubview:myImageView2];
}
completion:^ {
NSLog(@"Animations completed.");
// do something...
}];