Coder Social home page Coder Social logo

Comments (5)

mzamoras avatar mzamoras commented on July 23, 2024 1

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];];

from ios-fontawesome.

artisani avatar artisani commented on July 23, 2024

@jas54:
I've also tried to use fontawesome to acheive this in my iOS app and I haven't managed yet. Did you solve it eventually?

from ios-fontawesome.

jimmychu0807 avatar jimmychu0807 commented on July 23, 2024

Try this project: http://nschum.github.io/FontAwesomeIconFactory/

For specific on how to create a tabbar image, refer to this file:

https://github.com/nschum/FontAwesomeIconFactory/blob/master/FontAwesomeIconFactoryDemo/FontAwesomeIconFactoryDemo/TabBarController.m

from ios-fontawesome.

cloud-hot avatar cloud-hot commented on July 23, 2024

I have saw a API
"(UIImage_)imageWithIcon:(NSString_)identifier backgroundColor:(UIColor_)bgColor iconColor:(UIColor_)iconColor iconScale:(CGFloat)scale andSize:(CGSize)size;" in the UIImage+FontAwesome.h
But if i use it through swift it will also post a compiler error

UIImage(icon: <String!>, backgroundColor: <UIColor!>, iconColor: <UIColor!>, iconScale: , andSize: )

Could you tell me how to use this API? Thanks!

from ios-fontawesome.

aqua30 avatar aqua30 commented on July 23, 2024

You can check this https://github.com/aqua30/FontAwesomeTab .
It lets you add font awesome images in the tabs icon. May be its helpful to you.

from ios-fontawesome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.