animateWithDuration 不可用
我使用 iOS SDK 4.0 启动了一个项目,并希望使用块来为一些 UIView 制作动画。但在我认识到“animateWithDuration”不可用后,我将我的 XCode 和 iOS SDK 更新到了 4.2。在我的项目中,我也将“base sdk”设置为 4.2。
我认为这可能会解决问题。但 XCode 仍然抱怨缺少方法。此方法不适用于模拟器构建吗?或者我必须做什么才能激活它?
谢谢。 凯
i started a project with the iOS SDK 4.0 and want to use blocks in order to animate some UIViews. But after I recogized that "animateWithDuration" isn't available i updated my XCode and iOS SDK to 4.2. In my project I set the "base sdk" to 4.2, too.
I thought that might solve the problem. But XCode still complains about the missing method. Is this method not available for simulator builds? Or what do I have to do in oder to activate it?
Thx.
kie
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在项目构建设置中查找“部署目标”设置。这是您有兴趣支持的最低版本的 SDK。如果它低于 4.0,则编译器将删除所有 4.0 之前的方法(因为它们在您计划部署的设备上不可用)。尝试将其设置为4.0或更高版本;这应该有帮助。
Look in the project build settings for the Deployment Target setting. This is the lowest version of the SDK that you're interested in supporting. If it's lower than 4.0 then all of the pre-4.0 methods will be stripped out by the compiler (since they won't be available on the devices you're planning to deploy to). Try setting it to 4.0 or later; that should help.