OGeek|极客世界-中国程序员成长平台

标题: ios - 检查弃用警告和新方法 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 18:11
标题: ios - 检查弃用警告和新方法

最近我在 AppStore 上提交了我的应用,方法设置为 tabbaritem。

    [[[AppDelegate globalDelegate].tabBarController viewControllers] objectAtIndex:1].tabBarItem.badgeColor = kTabBarBadgeColor;

此角标(Badge)颜色仅适用于 iOS 10,我的应用支持 iOS 8 及更高版本。我对此一无所知,该应用程序获得了批准。现在,我必须重新提交我的应用来解决这个问题。

我想知道是否有办法找出方法被弃用或仅在特定操作系统版本中可见的情况。



Best Answer-推荐答案


通过更改 Xcode 项目的目标,您可以在构建时看到错误和警告。

如果您需要更多信息, 您可以在 Apple documentation 中查看所有 API 更改,例如 Added、Modified 和 Deprecated 变体

它将为您提供 Swift 和 Objective C 的搜索选项

enter image description here

正在搜索 UITabBarItem 实例属性 badgeColor。它给 API 的变化是无的。支持 SDK 的版本

SDKs
iOS 10.0+
tvOS 10.0+

搜索UITabBarItem的finishedSelectedImage实例方法。

SDK
iOS 5.0–7.0 Deprecated

Deprecated Use selectedImage with UIImageRenderingModeAlwaysOriginal instead.

关于ios - 检查弃用警告和新方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44924470/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4