在 UITabBarItem 使用原始圖片.
- 方法1: 在圖片 xcassets, 將 render as 設定成 original image.

- 方法2: 使用手動編碼
UIImage *icon = .......;
self.tabBarItem.image = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
Before

After

在 UITabBarItem 使用原始圖片.
UIImage *icon = .......;
self.tabBarItem.image = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
本文标题:UITabBarItem 使用原始圖片
本文链接:https://www.haomeiwen.com/subject/klrjhttx.html
网友评论