Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Swift warm up NSSpecialValue

3f7d9611fc919c98512b779cde637dfc?s=47 Johnlin
August 07, 2018
34

Swift warm up NSSpecialValue

3f7d9611fc919c98512b779cde637dfc?s=128

Johnlin

August 07, 2018
Tweet

Transcript

  1. Swift ఔࣜখ೤਎ NSSpecialValue John Lin

  2. NSValue • ओཁ༗ၷݸޭೳ • ࡏ objc ཫṶଘ C తݪੜྨผ •

    ࿨NSCoder ߹࡞ɼ೺෺݅Ꮣ੒ࢿྉɻ
  3. ṶଘC తݪੜྨผ • ᙛ೥ objc త NSArray ୞ೳଘ NSObject త

    Subclassɼෆೳ௚઀ଘ Int, Bool ೭ྨత • ༻ NSValue แىိ೭ޙबՄҎଘࡏNSArray ཫ • ՄҎ༻ intValue ೭ྨత೺ C తࢿྉ፤ճိ
  4. 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
  5. NSCoding • ճၚ Any? త decoder ቮៃ deprecated ྃɼ੥༻ Generic

  6. ࢿྉ᫚׵੒NSValue

  7. NSSpecialValue • NSValue త Subclass • NSPoint ೭ྨత౎ੋ

  8. NSSpecialValue subclass

  9. NSPoint(CGPoint) decode

  10. NSRange decode

  11. NSConcreteValue • ໵ੋ NSValue త subclass • แؚ ଖଞେ෦෼త objc

    㚎ݐ type ɼ૾ੋ NSNumber
  12. NSConcreteValue

  13. NSNumber Decode

  14. Special vs Contrete • concrete ౎ੋޠݴ㚎ݐత • Special ౎ੋ Foundation

    త • ෆաFoundation େ෦෼໵౎ෆ Special • NSSpecialValueେ֓ੋաڈతҨಟ㠧
  15. ݁࿦ • ؐੋ༻ Codable ޷ྃ • ୞༗ṧෆಘቮ࠶༻ NSCoding

  16. Q&A

  17. ፮ᐔػ • http://slot.miario.com/machines/150067