Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to change the background color of tabBar to transparent? #25

Closed
weinanfeng opened this issue Nov 4, 2015 · 4 comments
Closed

Comments

@weinanfeng
Copy link

trivial

Under tabBar, the color is purple. Is it possible to change the purple background color to transparent that user can see content (in this case the pink color) under tabBar?

@IgorMuzyka
Copy link
Contributor

@weinanfeng, absolutely. First you need this two imports in viewController where you want to change backgroundColor of tabBar.

#import "YALFoldingTabBarController.h"
#import "YALFoldingTabBar.h"

And then in that same viewController:

YALFoldingTabBarController *controller = (YALFoldingTabBarController *)self.tabBarController;
YALFoldingTabBar *tabBar = controller.tabBarView;
tabBar.backgroundColor = [UIColor preferredColor];

@rickyjwhong
Copy link

Hello,

I tried doing this with the [UIColor clearColor] but only end up getting a partially gray transparent background color. Any idea why?

@weinanfeng
Copy link
Author

@IgorMuzyka Thanks a lot! Works perfectly.

@harrymelka
Copy link

Hello,

I tried to do it with swift, didn't work :s,
Did you have any idea with it ?
Thank you

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

No branches or pull requests

4 participants