alinz / react-native-tabbar

Tab bar with more freedom
MIT License
265 stars 49 forks source link

里面的<IconWithBar label='Favorite' type={glypy.Favorite} from={'icomoon'}/>能详细介绍一下 type 和 from?参数应该怎么填? #18

Closed LYZName closed 8 years ago

alinz commented 8 years ago

@LYZName, so type and from are 2 properties which defines which unicode in custom font you want to use and from defines the font's name.

if you look at the example folder, code I have used a utility which comes with react-native-tabbar calls glypyMapMaker.

For better undrestanding how you could add new fotns to iOS and android app please refer to this repo which I documented everything.

navdove commented 8 years ago

Hi alinz, i have worked with xcode fonts before, i also checked your other repo, i still get "Unrecognized font family 'icomoon' " astounded! I could print in font name using swift though (same project has mix of swift, objc and react-native), i have tried restarting packager too. Any ideas?

alinz commented 8 years ago

@navdove

in iOS you should do 2 things in order to add a new font

screen shot 2016-01-29 at 2 08 10 pm

screen shot 2016-01-29 at 2 10 20 pm

and add your ttf font to a value Fonts provided by application. if it's not there just add new one.

screen shot 2016-01-29 at 2 11 40 pm

make sure to close react-native package terminal window and rebuild the project in xcode.

I am closing this ticket but feel free to continue the discussion here. I will try my best to help you guys.

Cheers,