Closed Terens777 closed 6 years ago
How to change the underscore color and the selected text, after swipe or selected tab?
override func swipeMenuView(_ swipeMenuView: SwipeMenuView, willChangeIndexFrom fromIndex: Int, to toIndex: Int) {
super.swipeMenuView(swipeMenuView, willChangeIndexFrom: fromIndex, to: toIndex)
switch toIndex {
case 0:
swipeMenuView.options.tabView.itemView.selectedTextColor = const.strategiSelectItemTextColor
swipeMenuView.options.tabView.additionView.backgroundColor = const.strategiSelectItemTextColor
case 1:
swipeMenuView.options.tabView.itemView.selectedTextColor = const.tradeIdeasSelectetItemTextColor
swipeMenuView.options.tabView.additionView.backgroundColor = const.tradeIdeasUnderLineColor
case 2:
swipeMenuView.options.tabView.itemView.selectedTextColor = const.strategiSelectItemTextColor
swipeMenuView.options.tabView.additionView.backgroundColor = const.strategiSelectItemTextColor
default:
break
}
swipeMenuView.reloadData(options: swipeMenuView.options, default: toIndex)
}
In this way, after a few clicks on taboos or several svaypov begins to work incorrectly
can be some kind of solution who has already encountered such an idea?
maybe error in reloadData?
I used the wrong method The solution works in this way
swipeMenuView.tabView?.reloadData(options: swipeMenuView.options.tabView)
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.