美文网首页
UITarbar 选中的图标(换肤)的显示

UITarbar 选中的图标(换肤)的显示

作者: 乡水情缘 | 来源:发表于2017-04-08 12:44 被阅读60次

今天遇到个小问题:项目中要做一个 换肤的效果(就是点击换肤改变tabbarItem的图片),结果界面上tabbar的图片就是没变化
查了下 image的几个样式

typedef NS_ENUM(NSInteger, UIImageRenderingMode) {  
    UIImageRenderingModeAutomatic,          // Use the default rendering mode for the context where the image is used  
      
    UIImageRenderingModeAlwaysOriginal,     // Always draw the original image, without treating it as a template  
    UIImageRenderingModeAlwaysTemplate,     // Always draw the image as a template image, ignoring its color information  
} NS_ENUM_AVAILABLE_IOS(7_0);  
648607-20170302093650813-1898428837.png

总结如果 遇到给某个空间赋值图片打不到预想的效果尝试改变渲染方式为原样试试。。

相关文章

网友评论

      本文标题:UITarbar 选中的图标(换肤)的显示

      本文链接:https://www.haomeiwen.com/subject/dmelattx.html