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/

Taketo Yoshida

June 28, 2016
Tweet

More Decks by Taketo Yoshida

Other Decks in Programming

Transcript

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

    Prefetching”) collectionView.isPrefetchingEnabled = false collectionView.isPrefetchingEnabled = true J04 J04 $FMM͕1SFGFUDI͞Ε ͳ͍ಈը $FMM͕1SFGFUDI͞Ε ͍ͯΔಈը
  2. /* ———————————————————————————————————————————— */ 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ը૾ͷμ΢ϯϩʔυͳͲ
  3. /* ———————————————————————————————————————————— */ print(“UIRefreshControl is Directly Supported”) let refreshControl =

    UIRefreshControl() refreshControl.addTarget( self, action: #selector(refreshControlDidFire(_:)), for: .valueChanged) collectionView.refreshControl = refreshControl 6*3FGSFTI$POUSPMΛσϑΥϧτͰαϙʔτ