ICViewPager icon indicating copy to clipboard operation
ICViewPager copied to clipboard

How to change the color of the selected tab?

Open ufosky opened this issue 9 years ago • 2 comments

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

ufosky avatar Oct 19 '14 19:10 ufosky

@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.

edding avatar Dec 26 '14 07:12 edding

Any Update on Highlight the Tab's Text ?

kmuddapu avatar Aug 13 '15 17:08 kmuddapu