-
Notifications
You must be signed in to change notification settings - Fork 256
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
How to add the font awesome image to a tab bar item image? #25
Comments
@jas54: |
Try this project: http://nschum.github.io/FontAwesomeIconFactory/ For specific on how to create a tabbar image, refer to this file: |
I have saw a API UIImage(icon: <String!>, backgroundColor: <UIColor!>, iconColor: <UIColor!>, iconScale: , andSize: ) Could you tell me how to use this API? Thanks! |
I tried this and seemed to work just fine! But only tried for TabBarItems. It's either a fix or just a work around. I`m using Xcode 6.3 and get it working on real device, besides simulator. Take a look. UIImage *iconDefault = [UIImage imageWithIcon:@"fa-github" backgroundColor:[UIColor clearColor] iconColor:[UIColor whiteColor] andSize:CGSizeMake(32, 32)];
UIImage *iconSelected = [UIImage imageWithIcon:@"fa-github" backgroundColor:[UIColor clearColor] iconColor:[UIColor blueColor] andSize:CGSizeMake(32, 32)];
UITabBarItem *tabItem = [_tabBar.items objectAtIndex:0];
tabItem.image = [iconDefault imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
tabItem.selectedImage = [iconSelected imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];]; |
You can check this https://github.com/aqua30/FontAwesomeTab . |
From the documentation, there are two options to use font awesome image[ via label strings and FAImageView].
But how to use the font awesome image to a UIImage?
For tab bar items with title, how can i set the font awesome image as the tab bar item image?
The text was updated successfully, but these errors were encountered: