wxxsw / SwiftTheme

🎨 Powerful theme/skin manager for iOS 9+ 主题/换肤, 暗色模式
MIT License
2.52k stars 306 forks source link

tabBar.theme_barTintColor fades tabBar border #148

Open aarashgoodarzi opened 3 years ago

aarashgoodarzi commented 3 years ago

I'm using this line to change tabBar color : tabBar.theme_tintColor = ThemeColorPicker.pickerWithUIColors([.white, .black])

when app loads with first theme there's no problem.

bordered

But if app loads with second theme when i change theme to the first, tabBar border will be faded!

no border

any help?

fukemy commented 3 years ago

hmm i face same problem here, for rounded border view, did u have any solutions?

aarashgoodarzi commented 3 years ago

Yes there is a solution. You have to give back the border by yourself, after theme changes. you can observe theme changes as mentioned in SwiftTheme documentation.

aarashgoodarzi commented 3 years ago

The best solution is to fix the issue by repo maintainers to avoid these hacky solutions :)

fukemy commented 3 years ago

hmm i know it, my situation is using round border for "view state", that mean when user online, u can see the green view, then it were inside tableview cell :(, as your guide, i have 2 case

  1. Reload table data -> the most simple case, but may lost current data, then screen will flashed when being reload
  2. Implement notification for each cell :(, that's better, but will take more and more code (check when cell reused, or visible in tableview.....)

    So i think better if have simple. way to set theme for border

aarashgoodarzi commented 3 years ago

Store your data then call reloadData() Implementing notification for each cell is not a good practice

wxxsw commented 3 years ago

https://user-images.githubusercontent.com/921863/115112999-a7083b00-9fba-11eb-9ae8-85cf93dd8507.mov

Can you provide a demo, or provide steps to reproduce bug?