使用xcode6来运行项目,发现使用原生的tabbar上的图片不显示了。

这个问题是因为xcode6中的一些api方法被废弃了,同时tabbar上图片的渲染方式发生了改变


先看xcode6中的tabbar api方法的变更:

- (void)setFinishedSelectedImage:(UIImage *)selectedImage withFinishedUnselectedImage:(UIImage *)unselectedImage NS_DEPRECATED_IOS(5_0,7_0,"Use initWithTitle:image:selectedImage: or the image and selectedImage properties along with UIImageRenderingModeAlwaysOriginal");


这个方法在IOS7中已经被废弃了,苹果建议初始化tabbarItem时使用initWithTitle:image:selectedImage:  
图片的渲染方式不使用默认而是使用UIImageRenderingModeAlwaysOriginal

 

 

 

相关文章:

  • 2021-07-29
  • 2021-10-17
  • 2021-07-19
  • 2021-09-08
  • 2022-02-04
  • 2021-12-12
  • 2021-07-18
  • 2021-06-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2021-12-31
  • 2021-06-05
  • 2022-12-23
相关资源
相似解决方案