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

HBFav実装のこだわり #confwd

B4afc7d853d7f1cb6a253d3c7183c05a?s=47 Naoya Ito
February 01, 2014

HBFav実装のこだわり #confwd

#confwd での LT の資料です

B4afc7d853d7f1cb6a253d3c7183c05a?s=128

Naoya Ito

February 01, 2014
Tweet

More Decks by Naoya Ito

Other Decks in Technology

Transcript

  1. )#'BWͷ࣮૷ͷͩ͜ΘΓ !OBPZB@JUP  $POGFSFODF8JUI%FWFMPQFST

  2. None
  3. SFCVJMEGNޮՌ

  4. None
  5. None
  6. 3VCZ.PUJPOͰͰ͖ͯ·͢

  7. ͩ͜ΘΓ

  8. ͳΊΒ͔ͳλΠϜϥΠϯ

  9. ͳΊΒ͔ʹ͢ΔͨΊʹ •  6*5BCMF7JFXεΫϩʔϧ଎౓ͷ࠷దԽ •  5XJUUFSΈ͍ͨͳ6*5BCMF7JFXͷߋ৽ •  ϦΞϧλΠϜ͡Όͳ͍΋ͷΛϦΞϧλΠϜ ͷΑ͏ʹݟͤΔ – J04ͷ3FNPUFOPUJpDBUJPOϞʔυ

  10. 6*5BCMF7JFXΛͳΊΒ͔ʹ ΋͸΍'"2Ͱ͕͢ŋŋŋ h"ps://blog.twi"er.com/2012/simple-­‐strategies-­‐smooth-­‐anima9on-­‐iphone

  11. ͓͓·͔ʹ •  ϦϞʔτͷϦιʔε͸ඇಉظͰऔಘ •  6TFEJSFDUESBXJOH – 1IBTF1JQFMJOFŋŋŋESBX3FDUͷதͰ ͸$16ˠ(16 – ηϧͷதͰ͸6*-BCFM΍6**NBHF7JFXͳ Ͳͷ7JFXΛαϒϏϡʔͱͤͣɺ ESBX*O3FDUͳͲͰ௚઀ඳը͢Δ

    •  (16ॲཧ͕࢝·Δલͷ$16ෛ୲ΛݮΒ͢
  12. ϦϞʔτͷϦιʔε͸ඇಉظͰ •  ࢛ͷޒͷݴΘͣ"'/FUXPSLJOH •  setImageWithURLReqest:placeholderI mage:success:failure: ͍ͭ͜ʹ೚ͤΕ͹ྑ͍ ײ͡Ͱඇಉظʹ

  13. %JSFDU%SBXJOH class  CustomCellContentView  <  UIView      def  drawRect(rect)  

           self.superview.superview.drawRectContent(rect)      end   end     class  BookmarkCell  <  UITableViewCell     def  initWithStyle(style,  reuseIdentifier:reuseIdentifier)      if  super          @contentView  =  CustomCellContentView.alloc.initWithFrame(CGRectZero)          ...   end     def  drawRectContent(rect)      ...      font  =  UIFront.boldSystemFontOfSize(16)      size  =  @text.sizeWithFont(font)      @text.drawInRect([[x,  y],  size],  withFont:font)   end   DPOUFOU7JFXͷ ESBX3FDU಺Ͱ ESBX*O3FDUͰඳը
  14. 5XJUUFSΈ͍ͨͳߋ৽ εΫϩʔϧͰ৽͠ ͍ηϧ͕Ͱͯ͘Δ 5XJUUFSΞϓϦ͸ ৽ண͕͋Δͱŋŋŋ 6*3FGSFTI$POUSPMΛී௨ʹ࢖͚ͬͨͩͰ͸͜ͷಈ͖ʹͳΒͳ͍

  15. DPOUFOU0GGTFUΛҡ࣋͢Δ offset  =  tableView.contentOffset   tableView.reloadData     for  i

     in  (0..prependedRowSize  -­‐  1)  do      offset.y  +=  self.tableView(          tableView,          heightForRowAtIndexPath:NSIndexPath.indexPathForRow(i,  inSection:0)      )   end     if  offset.y  >  tableView.contentSize.height      offset.y  =  0   end     tableView.setContentOffset(offset)   SFMPBEલͷ DPOUFOU0⒎TFU Λऔಘ ௥Ճͨ͠ηϧͷ ߴ͞Λܭࢉ ࠶ܭࢉͨ͠ P⒎TFUΛηοτ ͜ΕΛϞσϧߋ৽ͷΠϕϯτΛड͚औͬͨ࣌ʹ࣮ߦ͢Δ ΋͏ͪΐͬͱ଎͍࣮૷͕͋Γͦ͏ͳ͖΋͢Δ͚Ͳ 
  16. ϦΞϧλΠϜͷΑ͏ʹݟͤΔ •  )#'BWͷσʔλݩ͸͸ͯͳϒοΫϚʔΫ ͷ344ϑΟʔυ •  344औಘΛϢʔβʔʹҙࣝͤ͞ͳ͍ – ͸ͯͳϒοΫϚʔΫͷ8FC)PPLΛ࢖͍ɺ ৽ண͕͋ͬͨΒ୺຤ʹ3FNPUF1VTI – J04ͷ3FNPUFOPUJpDBUJPOܖػͰ 344ΛऔΓʹ͍͖ɺ5BCMF7JFXΛߋ৽ͯ͠

    ͓͘
  17. ͸ͯͳϒοΫϚʔΫ QVTIICGBWDPN 1BSTF .#BB4  "1/αʔόʔ ৽ணΠϕϯτΛ 8FC)PPLͰ .#BB4ܦ༝Ͱ QVTI͕ಧ͘

    344ΛऔΔ ΞϓϦΛ։͍ͨΒ΋͏৽ணσʔλ͕͋Δ
  18. BQQMJDBUJPOEJE3FDFJWF3FNPUF/PUJpDB UJPOGFUDI$PNQMFUJPO)BOEMFS def  application(application,  didReceiveRemoteNotification:userInfo,   fetchCompletionHandler:completionHandler)      self.timelineViewController.performBackgroundFetchWithCompletion(

             completionHandler      )      self.handlePush(application,  userInfo:userInfo)   end   J04͔Βɺ#BDLHSPVOE.PEFTͷ SFNPUFOPUJpDBUJPOTΛ༗ޮʹ͢Δ ͱɺQVTIܖػͰ͜ͷϋϯυϥ͕ݺ͹ ΕΔ
  19. ͓΋͠ΖϙΠϯτ •  3VCZ.PUJPOಛ༗ͷ࿩͸͍ͯ͠ͳ͍ – ҰൠతͳJ04ϓϩάϥϛϯάͷϊ΢ϋ΢ͦͷ ·· – ͭ·Γɺ3VCZ.PUJPOͰͰ͖Δ͜ͱ͸ 0CKFDUJWF$ͷͦΕͱมΘΒͳ͍

  20. 3VCZ.PUJPO͸ݴޠ͚͕ͩSVCZͰଞ͸શ෦Ұॹ

  21. ·ͱΊ •  )#'BW࢖ͬͯͳ͍΍ͭ͸৘ऑ 冗談です。   使ってね☆

  22. ͪͳΈʹ •  HJUIVCOBPZB)#'BWʹιʔε͋Γ· ͢ Ԛ͍͚Ͳ 

  23. ͪͳΈʹςετ͸͋Γ·ͤΜ

  24. ͢͜͠એ఻ •  ༝ॹਖ਼͍͠ #$ϝσΟΞܥͷJ04ΞϓϦ ࡞Δ͓࢓ࣄ͋Γ·͢ɻڵຯ͋Δํ PSձ ࣾ ɺ͓੠͕͚͍ͩ͘͞ •  ,"*;&/QMBUGPSN*ODͱ͍͏ձࣾͰ

    SVCZͰ͖Δਓืूͯ͠·͢