iOS10時代のCollectionView最新つかいこなし

61a68b2172503ecdf7a7f7757df56071?s=47 Tachibana Kaoru
August 20, 2016
9.2k

 iOS10時代のCollectionView最新つかいこなし

61a68b2172503ecdf7a7f7757df56071?s=128

Tachibana Kaoru

August 20, 2016
Tweet

Transcript

  1. 5.

    Cell Lifecycle cell cell cell cell cell cell cell cell

    cell cell cell cell cell cell cell cell cell cell cell cell cell cell cell cell 10000 cells for 10000-row table?
  2. 6.

    Cell Lifecycle cell cell cell cell cell cell cell cell

    cell cell cell cell cell cell cell cell cell cell cell cell cell cell cell cell 10000 cells for 10000-row table? x
  3. 20.
  4. 21.

    Cell Lifecycle 2 3 4 5 6 7 UICollectionViewCell -

    prepareForReuse ࠷ॳʹੜ੒͞ΕͨηϧΛ queueʹ͍Εͯ࠶ར༻
  5. 23.

    Cell Lifecycle 2 3 4 5 6 7 ͜Ε͕ reuse

    Λ΋ͱʹͨ͠ CellͷLifecycleͰ͢ɻ
  6. 28.

    Cell Lifecycle 2 3 4 5 6 8 7 9

    10 ࠓ·Ͱ͸ɺը໘ʹදࣔ͞ΕΔ௚લʹηϧ͕ੜ੒͞Εͯ ͍ͨͷͰɺͦͷॲཧ͕஗ΕΔͱεΫϩʔϧॲཧʹӨڹ ͕Ͱ͍ͯ·ͨ͠ queueͷCellͷ਺͕૿͑ͨ͜ͱͰੜ੒ॲཧ͕஗ΕΔ͜ͱ Մೳੑ͕௿͘ͳΓεΫϩʔϧͷύϑΥʔϚϯε͕Α͘ ͳΓ·ͨ͠
  7. 29.
  8. 30.

    Cell Lifecycle 2 3 4 5 6 8 7 9

    10 ͜͜ͰcellForItemAtIndexPath ͜͜ͰwillDisplay iOS10Ͱ͸……
  9. 37.

    prefetch API func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) func

    collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath])