嗨,我正在尝试创建侧边菜单,但收到警告,我已经搜索了很多选项,但对我没有任何帮助,请帮助我
我用过的代码:
-(void) animatedLayerToPoint:(CGFloat)x
{
[UIView animateKeyframesWithDuration:0.3 delay:0
options:UIViewAnimationCurveEaseOut
animations:^{
CGRect frame = self.toplayer.frame;
frame.origin.x = x;
self.toplayer.frame = frame;
}
completion:^(BOOL finished){
self.layerPosition = self.toplayer.frame.origin.x;
}];
}
这是我收到的警告
Implicit conversion from enumeration type 'enum UIViewAnimationCurve' to different enumeration type 'UIViewAnimationOptions' (aka 'enum UIViewAnimationOptions')
我搜索了解决方案我已经看到一些答案它不工作我 xcode 5 link i found solution 在上面的链接中被告知要给
他们要放这个
UIViewAnimationOptionCurveEaseOut
代替
UIViewAnimationCurveEaseOut
但它不工作请我需要帮助
最佳答案
在 iOS 4.0 及更高版本中不鼓励使用此方法。相反,您应该使用 animateWithDuration:delay:options:animations:completion:
方法来指定您的动画和动画曲线选项。
关于ios - Xcode 5 和 IOS 7 枚举警告 UIView 动画曲线 EaseOut,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21455726/