yysskk / SwipeMenuViewController

Swipable tab and menu View and ViewController.
MIT License
1.29k stars 131 forks source link

Is there a way to change the underline text color? #111

Open gilbertl opened 4 years ago

gilbertl commented 4 years ago

Is your feature request related to a problem? Please describe. I see in the demo images that the tab underline can be changed to blue, green, etc. Looking at the options struct however, there isn't such an option. In addition, the underline color doesn't match the selectedTextColor.

Describe the solution you'd like Either 1/ provide a color option in Underline or 2/ match the line's color to the selectedTextColor

sbotichelli commented 4 years ago

Here you go:

var options = SwipeMenuViewOptions()
options.tabView.itemView.textColor = UIColor.darkGrey
options.tabView.itemView.selectedTextColor = UIColor.red
options.tabView.additionView.backgroundColor = UIColor.red

swipeMenuView.reloadData(options: options)
r-a-o commented 3 years ago

@sbotichelli Are these the only customisations possible or can I have a custom view element part of the tabView? I want to place a coloured dot top-right of tab label as an indication of new content. Can I do such tabView customisation? (I think, I will either need to add my customisation as subview to tabView or replace the tabView with my custom view)