animateWithDuration 不可用

发布于 2024-10-06 07:06:36 字数 224 浏览 0 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

血之狂魔 2024-10-13 07:06:36

在项目构建设置中查找“部署目标”设置。这是您有兴趣支持的最低版本的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文