这是我为图像提供交叉溶解效果的代码
- (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){
}];
}];
}
但是我收到从枚举类型'enum UIViewAnimationOption 到不同枚举类型uiviewanimation 转换的警告隐式转换。
但是,如果我给UIViewAnimationTransitionFlipFromRight,UIViewAnimationTransitionCurlUp .....它正在工作,但 animatewithoptions 正在发出警告。
谁能帮我?