检查弃用警告和新方法

时间:2017-07-05 11:03:28

标签: ios deprecated uitabbaritem

最近我在AppStore上提交了我的app,其方法设置为tabbaritem的badgecolor。

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

此badgeColor仅限iOS 10,我的应用程序支持iOS 8及更高版本。我不知道它,应用程序得到批准。现在,我必须重新提交我的应用程序以解决此问题。

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

1 个答案:

答案 0 :(得分:0)

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

如果您需要更多信息, 您可以在Apple documentation

中查看所有API更改,例如Added,Modified & Deprecated个变体

它将为您提供Swift&的搜索选项。目标C

enter image description here

搜索UITabBarItem实例属性badgeColor。它给API更改是none.Supporting SDK的版本

SDKs
iOS 10.0+
tvOS 10.0+

搜索UITabBarItem的finishedSelectedImage实例方法。

SDK
iOS 5.0–7.0 Deprecated
  

不推荐使用带有UIImageRenderingModeAlwaysOriginal的selectedImage   代替。