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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Using icon font in iOS
2013/04/21 在 iOScon 上分享的keynote。
Pride Chung
April 21, 2013
Other Decks in Programming
See All in Programming
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
340
ソフトウェアラスタライザ
fadis
1
780
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
280
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
350
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
250
「AI時代、配布するPythonコードをどう守るか: 難読化の実験と判断軸」 #PyconJP2026
pkshadeck
PRO
2
130
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
330
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
560
Cloudflare is Agents
chimame
0
190
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
300
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
Featured
See All Featured
A better future with KSS
kneath
240
18k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The Invisible Side of Design
smashingmag
301
52k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
240
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Paper Plane
katiecoart
PRO
2
53k
We Are The Robots
honzajavorek
0
330
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
ラッコキーワード サービス紹介資料
rakko
1
4.7M
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
340
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⽇日星期⽇日