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
50
Swift warm up NSSpecialValue
Johnlin
August 07, 2018
Tweet
Share
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
89
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
220
Ruby 型別檢查工具簡介
johnlinvc
0
430
Swift Actor 實作探索
johnlinvc
0
150
用 mruby 來寫跨平台工具
johnlinvc
0
71
Actor model 簡介
johnlinvc
0
180
一起玩 Helm 3
johnlinvc
1
110
為什麼 App 卡卡的
johnlinvc
2
1.1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
190
Featured
See All Featured
Designing for humans not robots
tammielis
252
25k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
510
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Navigating Team Friction
lara
184
15k
Into the Great Unknown - MozCon
thekraken
36
1.7k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Become a Pro
speakerdeck
PRO
27
5.3k
GraphQLとの向き合い方2022年版
quramy
45
14k
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