This is my code for giving a crossdissolve effect for an image
- (void)viewDidLoad
{
[super viewDidLoad];
typedef enum
{
UIViewAnimationOptionTransitionCrossDissolve,
UIViewAnimationOptionTransitionCurlDown,
UIViewAnimationOptionTransitionCurlUp,
UIViewAnimationOptionTransitionFlipFromBottom,
UIViewAnimationOptionTransitionFlipFromLeft
} UIViewAnimationOptions;
[UIView animateWithDuration:1.0 animations:^(void){
[UIView setAnimationTransition: UIViewAnimationOptionTransitionCrossDissolve forView:img cache: YES];
} completion:^(BOOL finished){
[UIView animateWithDuration:1.0 animations:^(void){
[UIView setAnimationTransition: UIViewAnimationOptionTransitionCrossDissolve forView:img cache: YES];
} completion:^(BOOL finished){
}];
}];
}
But i am getting a warning implicit conversion from enumeration type 'enum UIViewAnimationOption to different enumeration type uiviewanimation transition.
But if i give UIViewAnimationTransitionFlipFromRight,UIViewAnimationTransitionCurlUp ..... it is working,but animatewithoptions is giving warning.
can anyone help me?