eggswift / ESTabBarController

:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie!
MIT License
5.17k stars 578 forks source link

中间特殊按钮不支持完全显示一张自定义图片 #238

Closed XWXGitHub closed 1 year ago

XWXGitHub commented 4 years ago

看了下好像是支持单张图片更改图片的图案的颜色结合背景色去实现图片的显示,不能够直接显示导入的图片

eggswift commented 4 years ago

试试 ESTabBarItemContentMode

XWXGitHub commented 4 years ago

ESTabBarItemContentMode

    iconColor = .clear
    highlightIconColor = .clear
    backdropColor = .clear
    highlightBackdropColor = .clear

    itemContentMode = ESTabBarItemContentMode.alwaysOriginal

试了下没有效果,只是字体变大了,而且iconColor和highlightIconColor是给了默认颜色的,所以我这边给了.clear所以什么都看不到了

Owl7 commented 3 years ago

tabbarItemContentView.renderingMode = .alwaysOriginal // 图片渲染,设置为自定义 这样就行了! @XWXGitHub