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
Swift warm up NSSpecialValue
Search
Johnlin
August 07, 2018
0
44
Swift warm up NSSpecialValue
Johnlin
August 07, 2018
Tweet
Share
More Decks by Johnlin
See All by Johnlin
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
110
Ruby 型別檢查工具簡介
johnlinvc
0
310
Swift Actor 實作探索
johnlinvc
0
130
用 mruby 來寫跨平台工具
johnlinvc
0
49
Actor model 簡介
johnlinvc
0
120
一起玩 Helm 3
johnlinvc
1
82
為什麼 App 卡卡的
johnlinvc
2
1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
130
Life of a Cell
johnlinvc
0
1.3k
Featured
See All Featured
Building Your Own Lightsaber
phodgson
98
5.7k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
BBQ
matthewcrist
80
8.7k
For a Future-Friendly Web
brad_frost
171
8.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Code Review Best Practice
trishagee
54
15k
Designing Experiences People Love
moore
136
23k
Why You Should Never Use an ORM
jnunemaker
PRO
50
8.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
12
1.5k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
356
22k
Transcript
Swift ఔࣜখ NSSpecialValue John Lin
NSValue • ओཁ༗ၷݸޭೳ • ࡏ objc ཫṶଘ C తݪੜྨผ •
NSCoder ߹࡞ɼ݅Ꮣࢿྉɻ
ṶଘC తݪੜྨผ • ᙛ objc త NSArray ೳଘ NSObject త
Subclassɼෆೳଘ Int, Bool ೭ྨత • ༻ NSValue แىိ೭ޙबՄҎଘࡏNSArray ཫ • ՄҎ༻ intValue ೭ྨత C తࢿྉ፤ճိ
NSCoding • ࡏ ݅ࢿྉؒ࡞ • See Zonble's book • https://github.com/zonble/kkbox-ios-dev/tree/
master/nscoding • https://zonble.gitbooks.io/kkbox-ios-dev/content/ nscoding/index.html
NSCoding • ճၚ Any? త decoder ቮៃ deprecated ྃɼ༻ Generic
൛
ࢿྉNSValue
NSSpecialValue • NSValue త Subclass • NSPoint ೭ྨతੋ
NSSpecialValue subclass
NSPoint(CGPoint) decode
NSRange decode
NSConcreteValue • ੋ NSValue త subclass • แؚ ଖଞେ෦త objc
㚎ݐ type ɼ૾ੋ NSNumber
NSConcreteValue
NSNumber Decode
Special vs Contrete • concrete ੋޠݴ㚎ݐత • Special ੋ Foundation
త • ෆաFoundation େ෦ෆ Special • NSSpecialValueେ֓ੋաڈతҨಟ㠧
݁ • ؐੋ༻ Codable ྃ • ༗ṧෆಘቮ࠶༻ NSCoding
Q&A
፮ᐔػ • http://slot.miario.com/machines/150067