signed

QiShunwang

“诚信为本、客户至上”

ios swift UITabBarItem UIBarButtonItem图片渲染模式(UIImage RenderingMode)

2021/4/26 14:07:14   来源:

代码

class TabBarVC: UITabBarController {
 let itemRecord: UITabBarItem = tabBar.items![0]
 itemRecord.selectedImage = UIImage(named: "recordSelect")?.withRenderingMode(.alwaysOriginal)

Assets.xcassets

在这里插入图片描述