gpt4 book ai didi

ios - Xcode 5 和 IOS 7 枚举警告 UIView 动画曲线 EaseOut

转载 作者:行者123 更新时间:2023-11-28 22:16:45 25 4
gpt4 key购买 nike

嗨,我正在尝试创建侧边菜单,但收到警告,我已经搜索了很多选项,但对我没有任何帮助,请帮助我

我用过的代码:

-(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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com