Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

How to change the color of the selected tab? #86

Open
ufosky opened this issue Oct 19, 2014 · 2 comments
Open

How to change the color of the selected tab? #86

ufosky opened this issue Oct 19, 2014 · 2 comments

Comments

@ufosky
Copy link

ufosky commented Oct 19, 2014

I need to set a highlight color for the selected tab,but i cannot find any way to implement this requirement.

@edding
Copy link

edding commented Dec 26, 2014

@ufosky
A temporary solution is to add some lines in the - (void)setActiveTabIndex:(NSUInteger)activeTabIndex method.
like this:

// Set to-be-inactive tab unselected
activeTabView = [self tabViewAtIndex:self.activeTabIndex];
activeTabView.selected = NO;
labelSubview = activeTabView.subviews[0];
labelSubview.textColor = [UIColor blackColor];

 // Set to-be-active tab selected
activeTabView = [self tabViewAtIndex:activeTabIndex];
activeTabView.selected = YES;
labelSubview = activeTabView.subviews[0];
labelSubview.textColor = [UIColor whiteColor];

Hope this could help you if you are still working on that project.

@kmuddapu
Copy link

Any Update on Highlight the Tab's Text ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants