Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Using icon font in iOS
Search
Pride Chung
April 21, 2013
Programming
5.7k
3
Share
Using icon font in iOS
2013/04/21 在 iOScon 上分享的keynote。
Pride Chung
April 21, 2013
Other Decks in Programming
See All in Programming
From Formal Specification to Property Based Test
ohbarye
0
680
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
130
의존성 주입과 모듈화
fornewid
0
160
ハーネスエンジニアリングとは?
kinopeee
13
6.7k
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1k
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
190
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
0
830
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
160
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
170
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
260
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.7k
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
2
290
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
290
Making Projects Easy
brettharned
120
6.6k
Optimizing for Happiness
mojombo
378
71k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
New Earth Scene 8
popppiees
3
2.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
240
Transcript
在iOS应⽤用中使⽤用 icon font 钟⼦子豪 @PrideChung
[email protected]
13年4月21⽇日星期⽇日
icon font是制作成字体⽂文件的图标。以字体的⽅方式来 显⽰示图标,在 Web 开发中相当流⾏行。 13年4月21⽇日星期⽇日
e.g 13年4月21⽇日星期⽇日
13年4月21⽇日星期⽇日
icon font好处都有啥? 13年4月21⽇日星期⽇日
⽮矢量字体⽂文件,放⼤大不失真 ⼀一次搞定不同分辨率 100% 500% @2x 13年4月21⽇日星期⽇日
通过代码⽅方便地控制图标属性 13年4月21⽇日星期⽇日
⽂文件体积 13年4月21⽇日星期⽇日
在 Web 开发中使⽤用 icon font 指定字体 指定图标编码 13年4月21⽇日星期⽇日
在 iOS 中使⽤用 icon font 添加字体 13年4月21⽇日星期⽇日
! static dispatch_once_t onceToken; ! dispatch_once(&onceToken, ^{ ! ! NSURL
* url = [[NSBundle mainBundle] URLForResource:@"FontAwesome" withExtension:@"otf"]; ! ! CGDataProviderRef fontDataProvider = CGDataProviderCreateWithURL((__bridge CFURLRef)url); ! ! CGFontRef newFont = CGFontCreateWithDataProvider(fontDataProvider); ! ! CGDataProviderRelease(fontDataProvider); ! ! CFErrorRef error; ! ! CTFontManagerRegisterGraphicsFont(newFont, &error); ! ! CGFontRelease(newFont); ! }); ! ! UIFont *font = [UIFont fontWithName:@"FontAwesome" size:size]; 运⾏行时注册 在项⺫⽬目的Info.plist中注册 或者 13年4月21⽇日星期⽇日
! UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 45, 45)];
! label.font = [UIFont fontWithName:@"FontAwesome" size:45]; ! label.text = @"\uf09b"; 13年4月21⽇日星期⽇日
Live Demo 代码已上传到 https://github.com/PrideChung/Demos/tree/ master/IconFontDemo 13年4月21⽇日星期⽇日
帮助使⽤用 icon font 的库 13年4月21⽇日星期⽇日
Font Awesome http://fortawesome.github.io/Font-Awesome/ 13年4月21⽇日星期⽇日
iconic http://somerandomdude.com/work/iconic/ 13年4月21⽇日星期⽇日
icon font⼤大搜罗 http://www.qianduan.net/icon-font-large-collecting.html 13年4月21⽇日星期⽇日
制作 icon font 给你的设计师看这个: http://ux.etao.com/posts/221 13年4月21⽇日星期⽇日
I’m looking for jobs (Not the Steve one) 13年4月21⽇日星期⽇日
Thank You 13年4月21⽇日星期⽇日