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

Protocol 的實例、測試和心得

Protocol 的實例、測試和心得

2016-11-10 CocoaHeads Taipei 的分享
Demo Repo: https://github.com/vc7/protocolDemoSwift

Li-Hsuan Chen

November 10, 2016
Tweet

More Decks by Li-Hsuan Chen

Other Decks in Programming

Transcript

  1. 1SPUPDPM
    㻜⢿庠鑑ㄤ䗱䖤

    ꤫愴蠩

    View Slide

  2. 䧮僽铪
    ˖ 䖰0CKFDUJWF$Ꟛ㨥㻨
    ˖ 㻨ⵌ4XJGU
    ˖ ⱄ㻨ⵌ4XJGU涸J04䊨玑䌌
    ˖ IBOEMFST!WD!WJODF

    View Slide

  3. View Slide

  4. View Slide

  5. 姻晚Ꟛ㨥

    View Slide

  6. 剚闍➊랃
    ˖ 1SPUPDPM鸏⦐匌銯
    ˖ ㄤ欽ⵌ涸錚䙂
    ˖ %FNP
    ˖ 㻜⢿庠鑑
    ˖ 䗱䖤
    剣毟㉏涸鑧〳⟃䩧倫䧮

    View Slide

  7. 1SPUPDPM

    View Slide

  8. 1SPUPDPM0SJFOUFE
    1SPHSBNNJOH
    鸏⦐㣐㹻㔐⿡溏88%$涸4FTTJPO㽠㥪

    View Slide

  9. 1SPUPDPM
    ˖ ꆚ㼩➝꬗罜ꬌꆚ㼩㻜⡲⢵之㻨玑䒭焺
    ˖ 1SPHSBNUPBOJOUFSGBDFOPUBOJNQMFNFOUBUJPO
    ˖ 鏤鎙➝꬗ず儘⛳➿邍嫲鯱腋䖰꨾宠涸錬䏞䙼罌
    ˖ 刿⸈僒隡僒⢪欽刿⸈顦鵜꨾宠

    View Slide

  10. 湱⣜䚍岤Ⰵ꣮⡜湱⣜䚍
    ˖ 羓ざ꣮⡜䖕㣐㣐꣮⡜垸穉⻋ꨈ䏞
    ˖ ꥬꨆ痧♲倰㤛⟝
    ˖ ꣮⡜剐䳖ㄤ⥜佖䧭劥
    ˖ 㺂僒㻜⡲庠鑑剐魨
    %* 羑さ

    View Slide

  11. 庠鑑剐魨5FTU%PVCMF
    捀✫〳⟃雊湡垦暟⟝〳⟃鄄栬用庠鑑
    䗳갭ꥬ穪莅㢫鿈湱⣜暟⟝涸✽⹛
    465
    4PGUXBSF6OEFS5FTU
    %0$
    %FQFOEFEPO$PNQPOFOU

    View Slide

  12. 捀✫〳⟃雊湡垦暟⟝〳⟃溫涸栬用
    〳⟃欽♧⦐庠鑑剐魨⢵剐➿㢫鿈湱⣜暟⟝
    庠鑑剐魨5FTU%PVCMF
    465
    4PGUXBSF6OEFS5FTU
    %0$
    %FQFOEFEPO$PNQPOFOU
    5FTU%PVCMF

    View Slide

  13. %*爚䠑
    "暟⟝
    #暟⟝
    歋NFUIPE
    䧴QSPQFSUZ鍸涮
    "暟⟝
    #暟⟝
    歋NFUIPE
    䧴QSPQFSUZ鍸涮
    QSPUPDPM
    QSPUPDPM
    "暟⟝ㄤ#暟⟝
    羓ざ
    ⢪欽QSPUPDPM
    鍑羓ざ

    View Slide

  14. %FNP

    View Slide

  15. %FNP
    ˖ 䖰BDDFTTUPLFOⴼ倬涬Ⰵ朜䢀
    ˖ ⢪欽痧♲倰MJCSBSZ盘椚BDDFTTUPLFO
    ˖ ⚛ꥬꨆ痧♲倰MJCSBSZ
    ˖ 庠鑑
    ˖ 之㻨庠鑑剐魨

    View Slide

  16. 䗱䖤

    View Slide

  17. 1SPUPDPM涸䍲⸔
    ˖ 佖鋊呔䨾꨾銴涸隶刿䧭劥隶㼭✫
    ˖ 玑䒭焺刿䱺鵜⢪欽䞕㞯刿㺂僒ꠗ隡
    ˖ 刿㺂僒ꡠ㥪痧♲倰MJCSBSJFT
    ˖ ꣮⡜剐䳖涸遼乹
    ˖ 鷴麕%*瘞䩛媯刿㺂僒栬用庠鑑

    View Slide

  18. 䧮涸Ⱖ➮
    ˖ 2JJUB湡⵹⚺銴涸鿈衆呔
    ˖ IUUQRJJUBDPNWD
    ˖ (JU)VC
    ˖ IUUQTHJUIVCDPNWD
    ˖ 4QFBLFS%FDL
    ˖ IUUQTTQFBLFSEFDLDPNWD

    View Slide

  19. 5IBOL:PV

    View Slide