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

UICollectionView in iOS10

UICollectionView in iOS10

2016.6.27 WWDC16情報共有会@Fablicで発表した
iOS10のUICollectionViewについてのまとめです
http://fablic.connpass.com/event/32380/

253696343a018052ff394eb1f63e3d6f?s=128

Taketo Yoshida

June 28, 2016
Tweet

Transcript

  1. 6*$PMMFDUJPO7JFXJOJ04 /* Taketo Yoshida, Nikkei Inc. */ 88%$৘ใڞ༗ձ!'BCMJD

  2. /* ———————————————————————————————————————————— */ print(“Who am I?”) w ٢ా݈ਓʢϤγμλέτʣ w ೔ຊܦࡁ৽ฉࣾ೥ೖࣾ

    w J04%FWFMPQFS w ࢴ໘ϏϡʔΞʔΞϓϦͷ։ൃऀ w 88%$ʹࢀՃ͖ͯ͠·ͨ͠ w Ωʔϫʔυ ຑ੃ Ξχϝ ΍͖͏
  3. /* ———————————————————————————————————————————— */ print(“What Services do Nikkei Provide?”) ϞόΠϧͱσεΫτοϓ޲͚ʹ ೔ܦͷே༦ץͳͲΛӾཡͰ͖ΔαʔϏε

    ֹ݄ԁͷ༗ྉχϡʔεαʔϏε ༗ྉձһ਺͸໿ສਓ
  4. J04ͷ6*$PMMFDUJPO7JFX ͰԿ͕มΘͬͨͷ͔ʁ

  5. $FMMͱ%BUBͷ1SFGFUDI͕Մೳ

  6. /* ———————————————————————————————————————————— */ print(“Life Cycle of a Cell and Cell

    Prefetching”) collectionView.isPrefetchingEnabled = false collectionView.isPrefetchingEnabled = true J04 J04 $FMM͕1SFGFUDI͞Ε ͳ͍ಈը $FMM͕1SFGFUDI͞Ε ͍ͯΔಈը
  7. /* ———————————————————————————————————————————— */ w XJMM%JTQMBZ$FMMͷݺͼग़͠ͷλΠϛϯά͕ม ߋ͞Εͨ w 4DSFFOͷ֎ʹ$FMM͕Ҡಈͯ͠΋ɺ͙͢ʹ͸ SFVTFRVFVFʹ௥Ճ͞Εͳ͍ʢഁغ͞Εͳ ͍ʣ

    print(“Life Cycle of a Cell and Cell Prefetching”)
  8. /* ———————————————————————————————————————————— */ print(“Data Pre-Fetching API”) protocol UICollectionViewDataSourcePrefetching { func

    collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [NSIndexPath]) optional func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [NSIndexPath]) } class UICollectionView : UIScrollView { weak var prefetchDataSource: UICollectionViewDataSourcePrefetching? var isPrefetchingEnabled: Bool } DFMM'PS*UFN"U͕ݺ͹ΕΔલʹॲཧΛૠೖ͢Δ͜ͱ͕Ͱ͖Δ FYը૾ͷμ΢ϯϩʔυͳͲ
  9. 6*3FGSFTI$POUSPMͷαϙʔτ

  10. /* ———————————————————————————————————————————— */ print(“UIRefreshControl is Directly Supported”) let refreshControl =

    UIRefreshControl() refreshControl.addTarget( self, action: #selector(refreshControlDidFire(_:)), for: .valueChanged) collectionView.refreshControl = refreshControl 6*3FGSFTI$POUSPMΛσϑΥϧτͰαϙʔτ
  11. ͜ΕΒ͸6*5BCMF7JFX ʹ͓͍ͯ΋࢖༻Մೳ

  12. ࠷ޙʹ

  13. /* ———————————————————————————————————————————— */ w $FMMͷϥΠϑαΠΫϧ͕มߋ w 1SF'FUDIJOH"1* w 6*3FGSFTI$POUSPMͷαϙʔτ w

    4FMG4J[JOH$FMMͷվળ w *OUFSBDUJWF3FPSEFSJOHͷվળ print(“What’s New in UICollectionView in iOS10”)
  14. +PJOVT IUUQTOJLLFJDPNTBJZP