Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

KKBOX WWDC17 UIKit Drag and Drop - Mario

4.846 visualizaciones

Publicado el

KKTV iOS 工程師 Mario 分享
影片位置 https://youtu.be/4U9QbQFo7gU
相關 Sessions
- [Data Delivery with Drag and Drop] (https://developer.apple.com/videos/wwdc2017/videos/play/wwdc2017/227/)
- [Drag and Drop with Collection and Table View] (https://developer.apple.com/videos/wwdc2017/videos/play/wwdc2017/223/)
- [Introducing Drag and Drop] (https://developer.apple.com/videos/wwdc2017/videos/play/wwdc2017/203/)
- [Mastering Drag and Drop] (https://developer.apple.com/videos/wwdc2017/videos/play/wwdc2017/213/)

Publicado en: Tecnología
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

KKBOX WWDC17 UIKit Drag and Drop - Mario

  1. 1. Drag and Drop in iOS 11 Mario Tung KKTV
  2. 2. Summary - Goals for drag and drop - Different phases of a drag session - Essential Functions - Drag delegates - Drop delegates - Next step
  3. 3. What is drag and drop? A way to move data around
  4. 4. Goals for Drag and Drop Responsive - On demand / Async data transfer Secure - Source app can choose what data to transfer / who to transfer to - Data is only visible to destination Great multi touch experience - Deep integration with iOS apps - Multiple types of touch/gestures can be used
  5. 5. Demo
  6. 6. Phases of a drag session Data transfer time depends on file size
  7. 7. Drag begins: get data items - Use UIDragItems for transferring data - NSItemProvider only allows objects (not string structs)
  8. 8. Get drop proposal during session update - Called when touch point has moved in view / additional items are added - Return what to do when user drops item now - 4 types of UIDropOperations (Cancel / Copy / Move / Forbidden) - Move operation is only allowed within the same app
  9. 9. Perform the drop - Perform data transfer of objects
  10. 10. Customizing Drag and Drop - Use the drag interaction delegate to find out when views are lifted / being dragged around - Use drop interaction delegate to find out when an item has entered view / dropped into view
  11. 11. Drag interaction delegate - Lift - View to be shown when dragging
  12. 12. Drag interaction delegate - Session begins and moves
  13. 13. Drag interaction delegate - Adding more items - Add additional items to drag session - Update preview view accordingly
  14. 14. Drag interaction delegate - End session - Session is going to end with one of the four types of UIDropOperation
  15. 15. Drag interaction delegate - End session (Cancel)
  16. 16. Drag interaction delegate - End session (Copy/Move)
  17. 17. Drop interaction delegates
  18. 18. Drop interaction delegate - Session enters view - Can be used to filter out types of data that are accepted
  19. 19. Drop interaction delegate - Session enters/exits view - Enter/update/exit can happen multiple times - delegates will keep getting called
  20. 20. Drop interaction delegate - Drop animations - Execute any further UI changes to the UITargetedDragPreview from previewForLifting
  21. 21. Next step - exploring more

×