203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience...

198
#WWDC17 © 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Bruce Nilo, UIKit Engineering Manager Kurt Revis, UIKit Engineer Emanuele Rudel, UIKit Engineer Introducing Drag and Drop Session 203 App Frameworks

Transcript of 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience...

Page 1: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

#WWDC17

© 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Bruce Nilo, UIKit Engineering Manager Kurt Revis, UIKit Engineer Emanuele Rudel, UIKit Engineer

•Introducing Drag and Drop • Session 203

App Frameworks

Page 2: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

•Goals and concepts •API fundamentals •Showing the APIs in action •Next steps

Page 3: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

What is Drag and Drop?

Page 4: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

What is Drag and Drop?

A way to graphically move or copy data

Page 5: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

Page 6: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

Responsive

Page 7: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

Responsive• On demand and asynchronous data delivery

Page 8: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

Responsive

Secure

Page 9: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

Responsive

Secure• Data is only visible to destination

Page 10: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

Responsive

Secure• Data is only visible to destination• Source may restrict access

Page 11: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

Responsive

Secure

A great Multi-Touch experience

Page 12: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback
Page 13: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback
Page 14: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

Page 15: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

A great Multi-Touch experience

Page 16: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Goals

A great Multi-Touch experience• The interface is live• Deep integration with all of iOS• Great visual feedback• Hover to navigate• Items can be added• Transfer drags between fingers• Multiple drag interactions

Page 17: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS

Vs.

Page 18: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

•Concepts

Page 19: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop on iOS Phases of a drag session

Page 20: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Lift Drag Set Down Data Transfer

Drag and Drop on iOS Phases of a drag session

Page 21: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Long press

Lift preview

Lift Drag Set Down Data Transfer

Drag and Drop on iOS Phases of a drag session

Page 22: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Long press

Lift preview

Previews

Tap to add

Spring-loading

Lift Drag Set Down Data Transfer

Drag and Drop on iOS Phases of a drag session

Page 23: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Long press

Lift preview

Previews

Tap to add

Spring-loading

Cancel

Drop

Targeting

Lift Drag Set Down Data Transfer

Drag and Drop on iOS Phases of a drag session

Page 24: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Long press

Lift preview

Previews

Tap to add

Spring-loading

Cancel

Drop

Targeting

Representations

Lazy delivery • Background • By File Provider

Progress

Lift Drag Set Down Data Transfer

Drag and Drop on iOS Phases of a drag session

Page 25: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drag Concepts - interactions

Interaction

View

Page 26: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drag Concepts - interactions

Input Interaction

View

Page 27: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drag Concepts - UIDragInteraction

A drag interaction is attached to a view View

Page 28: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drag Concepts - UIDragInteraction

A drag interaction is attached to a view

DragInteraction

Drag Interaction Delegate

View

Page 29: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drag Concepts - UIDragInteraction

A drag interaction is attached to a view

DragInteraction

Drag Interaction Delegate

View

import UIKit

let view: UIView = ... let delegate: UIDragInteractionDelegate = ...

let dragInteraction = UIDragInteraction(delegate: delegate) view.addInteraction(dragInteraction)

Page 30: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Lift Phase Concepts - UIDragInteraction

The delegate provides drag itemswhen the view lifts

DragInteraction

Drag Interaction Delegate

View

Page 31: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

DragItems

Lift Phase Concepts - UIDragInteraction

The delegate provides drag itemswhen the view lifts

No drag items -> drag gesture fails Drag

Interaction

Drag Interaction Delegate

View

Page 32: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Items Concepts - UIDragItem

DragItems

Page 33: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Model Objects

Drag Items Concepts - UIDragItem

A drag item represents a model object

DragItems

Page 34: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Items Concepts - UIDragItem

A drag item represents a model object

A drag item embodies • Drag preview • Item provider

Model Objects

Previews

Item ProvidersDragItems

Page 35: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drop Concepts - UIPasteConfiguration

Page 36: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drop Concepts - UIPasteConfiguration

UIResponders have a new paste configuration property

Paste Configuration

View

Page 37: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drop Concepts - UIPasteConfiguration

UIResponders have a new paste configuration property

// Indicate you can accept or paste strings

let config = UIPasteConfiguration(typeIdentifiersForAcceptingClass: NSString.self)view.pasteConfiguration = config

Paste Configuration

View

Page 38: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drop Concepts - UIPasteConfiguration

UIResponders have a new paste configuration property

Paste Configuration

View

// Will be called for both Drag and Drop, and Copy/Paste

override func paste(itemProviders: [NSItemProvider]) {}

Page 39: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Enabling a Drop Concepts - UIDropInteraction

A drop interaction is attached to a view

Drop Interaction

View

Drop Interaction Delegate

Page 40: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Phase Concepts - UIDropInteraction

The delegate responds to drag events

Drop Interaction

View

Drop Interaction Delegate

drag eventsDrop Proposal

Page 41: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Set Down Phase Concepts - UIDropInteraction

On touch up, the drag session may be cancelled • The drag preview animates back

Drop Interaction

View

Drop Interaction Delegate

Page 42: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Set Down Phase Concepts - UIDropInteraction

Or the drop is accepted • The delegate is told to perform drop

perform drop

Drop Interaction Delegate

Page 43: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Data Transfer Phase Concepts - UIDropInteraction

Or the drop is accepted• The delegate is told to perform drop

perform drop

Drop Interaction Delegate

Item Provider

Drag Items

Page 44: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Data Transfer Phase Concepts - UIDropInteraction

Or the drop is accepted• The delegate is told to perform drop

Delegate requests data representation of items

perform drop

Drop Interaction Delegate

Item Provider

Drag Items

Request Item

Page 45: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Data Transfer Phase Concepts - UIDropInteraction

Or the drop is accepted• The delegate is told to perform drop

Delegate requests data representation of items

perform drop

Drop Interaction Delegate

Item Provider

Drag Items

AsynchronousData TransferRequest Item

Page 46: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

•API Roadmap

Page 47: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Roadmap

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 48: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Kurt Revis, UIKit Engineer

•Using the Drag and Drop API

Page 49: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

•Drag and drop timeline •API essentials •Introduction to the full API

Page 50: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

Page 51: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

Page 52: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

Page 53: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

Page 54: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

Page 55: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

Page 56: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Page 57: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Time

Touch Begins

Page 58: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Lift

Touch Begins

Page 59: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down

Lift

Touch Begins

Page 60: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves

DragLift

Touch Begins

Page 61: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves

DragLift

Touch Begins

Page 62: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift

Touch Begins

Page 63: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift

Touch Begins

Page 64: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift

Touch BeginsLocation is not on a view

that accepts the drop

Page 65: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift Cancel Animations

Touch BeginsLocation is not on a view

that accepts the drop

Page 66: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift

Touch Begins

Page 67: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift

Touch Begins

Page 68: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift

Touch BeginsLocation is on a viewthat accepts the drop

Page 69: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform

Touch BeginsLocation is on a viewthat accepts the drop

Page 70: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform

Touch BeginsLocation is on a viewthat accepts the drop

Page 71: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform

Touch BeginsLocation is on a viewthat accepts the drop

Drop Animation

Page 72: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform

Data Transfer

Touch BeginsLocation is on a viewthat accepts the drop

Drop Animation

Page 73: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Time

Perform Drop Animation

Data Transfer

Page 74: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Time

Perform Drop Animation

Data Transfer

Page 75: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Time

Perform Drop Animation

Data Transfer

Page 76: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animationsor

Touch Begins

Page 77: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

or

API Essentials—1

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animations

Touch Begins

Page 78: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—1 Get the items to drag

func dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) -> [UIDragItem]

Page 79: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—1 Get the items to drag

func dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) -> [UIDragItem]

Page 80: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—1 Get the items to drag

func dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) -> [UIDragItem] { let itemProvider = NSItemProvider(object: "Hello World" as NSString) let dragItem = UIDragItem(itemProvider: itemProvider) return [ dragItem ] }

Page 81: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—1 Get the items to drag

func dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) -> [UIDragItem] { let itemProvider = NSItemProvider(object: "Hello World" as NSString) let dragItem = UIDragItem(itemProvider: itemProvider) return [ dragItem ] }

Page 82: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—1 Get the items to drag

func dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) -> [UIDragItem] { let itemProvider = NSItemProvider(object: "Hello World" as NSString) let dragItem = UIDragItem(itemProvider: itemProvider) return [ dragItem ] }

Page 83: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—1 Get the items to drag

func dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) -> [UIDragItem] { let itemProvider = NSItemProvider(object: "Hello World" as NSString) let dragItem = UIDragItem(itemProvider: itemProvider) return [ dragItem ] }

Page 84: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animationsor

Touch Begins

Page 85: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 Get the drop proposal

func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal { return UIDropProposal(operation: UIDropOperation)}

Page 86: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 Get the drop proposal

func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal { return UIDropProposal(operation: UIDropOperation)}

Page 87: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 Get the drop proposal

func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal { return UIDropProposal(operation: UIDropOperation)}

Page 88: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

Page 89: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

• .cancel • .copy • .move • .forbidden

Page 90: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

• .cancel • .copy • .move • .forbidden

Page 91: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

• .cancel • .copy • .move • .forbidden

Page 92: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

• .cancel • .copy • .move • .forbidden

Page 93: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

Delegates must cooperateto make it look like a move

• .move

Page 94: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

Delegates must cooperateto make it look like a move

Only within a single app

• .move

Page 95: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

Delegates must cooperateto make it look like a move

Only within a single app

Drag interaction delegatemust allow moves

• .move

Page 96: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

Delegates must cooperateto make it look like a move

Only within a single app

Drag interaction delegatemust allow moves

Drop interaction delegate checksUIDropSession allowsMoveOperation

• .move

Page 97: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—2 UIDropOperation

• .cancel • .copy • .move • .forbidden

Page 98: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animationsor

Touch Begins

Page 99: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession)

Page 100: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession)

Page 101: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { session.loadObjects(ofClass: UIImage.self) { objects in for image in objects as! [UIImage] { self.imageView.image = image } } }

Page 102: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { session.loadObjects(ofClass: UIImage.self) { objects in for image in objects as! [UIImage] { self.imageView.image = image } } }

Page 103: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { session.loadObjects(ofClass: UIImage.self) { objects in for image in objects as! [UIImage] { self.imageView.image = image } } }

Page 104: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { session.loadObjects(ofClass: UIImage.self) { objects in for image in objects as! [UIImage] { self.imageView.image = image } } }

Page 105: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { for item in session.items { item.itemProvider.loadObject(ofClass: UIImage.self) { (object, error) in if object != nil { DispatchQueue.main.async { self.imageView.image = (object as! UIImage) } } else { // Handle the error } } }

Page 106: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { for item in session.items { item.itemProvider.loadObject(ofClass: UIImage.self) { (object, error) in if object != nil { DispatchQueue.main.async { self.imageView.image = (object as! UIImage) } } else { // Handle the error } } }

Page 107: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { for item in session.items { item.itemProvider.loadObject(ofClass: UIImage.self) { (object, error) in if object != nil { DispatchQueue.main.async { self.imageView.image = (object as! UIImage) } } else { // Handle the error } } }

Page 108: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { for item in session.items { item.itemProvider.loadObject(ofClass: UIImage.self) { (object, error) in if object != nil { DispatchQueue.main.async { self.imageView.image = (object as! UIImage) } } else { // Handle the error } } }

Page 109: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials—3 Perform the drop

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { for item in session.items { item.itemProvider.loadObject(ofClass: UIImage.self) { (object, error) in if object != nil { DispatchQueue.main.async { self.imageView.image = (object as! UIImage) } } else { // Handle the error } } }

Page 110: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animationsor

Touch Begins

Page 111: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animationsor

Touch Begins

Get itemsto drag

Page 112: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animationsor

Touch Begins

Get itemsto drag

Get a drop proposal

Page 113: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

API Essentials

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animationsor

Touch Begins

Get itemsto drag

Get a drop proposal

Performdrop

Page 114: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

•Drag Interaction Delegate

Page 115: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview?

Page 116: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview?

Page 117: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview?

Page 118: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview? { let imageView = UIImageView(image: UIImage(named: "MyDragImage")) let dragView = interaction.view! let dragPoint = session.location(in: dragView) let target = UIDragPreviewTarget(container: dragView, center: dragPoint) return UITargetedDragPreview(view: imageView, parameters:UIDragPreviewParameters(), target:target) }

Page 119: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview? { let imageView = UIImageView(image: UIImage(named: "MyDragImage")) let dragView = interaction.view! let dragPoint = session.location(in: dragView) let target = UIDragPreviewTarget(container: dragView, center: dragPoint) return UITargetedDragPreview(view: imageView, parameters:UIDragPreviewParameters(), target:target) }

Page 120: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview? { let imageView = UIImageView(image: UIImage(named: "MyDragImage")) let dragView = interaction.view! let dragPoint = session.location(in: dragView) let target = UIDragPreviewTarget(container: dragView, center: dragPoint) return UITargetedDragPreview(view: imageView, parameters:UIDragPreviewParameters(), target:target) }

Page 121: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview? { let imageView = UIImageView(image: UIImage(named: "MyDragImage")) let dragView = interaction.view! let dragPoint = session.location(in: dragView) let target = UIDragPreviewTarget(container: dragView, center: dragPoint) return UITargetedDragPreview(view: imageView, parameters:UIDragPreviewParameters(), target:target) }

Page 122: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview? { let imageView = UIImageView(image: UIImage(named: "MyDragImage")) let dragView = interaction.view! let dragPoint = session.location(in: dragView) let target = UIDragPreviewTarget(container: dragView, center: dragPoint) return UITargetedDragPreview(view: imageView, parameters:UIDragPreviewParameters(), target:target) }

Page 123: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction: UIDragInteraction, willAnimateLiftWith animator: UIDragAnimating, session: UIDragSession) { animator.addAnimations { self.view.backgroundColor = UIColor.gray } animator.addCompletion { position in if position == .end { // The lift ended normally, and a drag is now happening } else if position == .start { // The lift was cancelled and the animation returned to the start } }}

Page 124: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction: UIDragInteraction, willAnimateLiftWith animator: UIDragAnimating, session: UIDragSession) { animator.addAnimations { self.view.backgroundColor = UIColor.gray } animator.addCompletion { position in if position == .end { // The lift ended normally, and a drag is now happening } else if position == .start { // The lift was cancelled and the animation returned to the start } }}

Page 125: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction: UIDragInteraction, willAnimateLiftWith animator: UIDragAnimating, session: UIDragSession) { animator.addAnimations { self.view.backgroundColor = UIColor.gray } animator.addCompletion { position in if position == .end { // The lift ended normally, and a drag is now happening } else if position == .start { // The lift was cancelled and the animation returned to the start } }}

Page 126: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Lift

func dragInteraction(_ interaction: UIDragInteraction, willAnimateLiftWith animator: UIDragAnimating, session: UIDragSession) { animator.addAnimations { self.view.backgroundColor = UIColor.gray } animator.addCompletion { position in if position == .end { // The lift ended normally, and a drag is now happening } else if position == .start { // The lift was cancelled and the animation returned to the start } }}

Page 127: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Session begins and moves

func dragInteraction(_ interaction: UIDragInteraction, sessionWillBegin session: UIDragSession)

func dragInteraction(_ interaction: UIDragInteraction, sessionAllowsMoveOperation session: UIDragSession) -> Bool // And more methods asking questions about the new drag session

func dragInteraction(_ interaction: UIDragInteraction, sessionDidMove session: UIDragSession)

Page 128: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Session begins and moves

func dragInteraction(_ interaction: UIDragInteraction, sessionWillBegin session: UIDragSession)

func dragInteraction(_ interaction: UIDragInteraction, sessionAllowsMoveOperation session: UIDragSession) -> Bool // And more methods asking questions about the new drag session

func dragInteraction(_ interaction: UIDragInteraction, sessionDidMove session: UIDragSession)

Page 129: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Session begins and moves

func dragInteraction(_ interaction: UIDragInteraction, sessionWillBegin session: UIDragSession)

func dragInteraction(_ interaction: UIDragInteraction, sessionAllowsMoveOperation session: UIDragSession) -> Bool // And more methods asking questions about the new drag session

func dragInteraction(_ interaction: UIDragInteraction, sessionDidMove session: UIDragSession)

Page 130: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Session begins and moves

func dragInteraction(_ interaction: UIDragInteraction, sessionWillBegin session: UIDragSession)

func dragInteraction(_ interaction: UIDragInteraction, sessionAllowsMoveOperation session: UIDragSession) -> Bool // And more methods asking questions about the new drag session

func dragInteraction(_ interaction: UIDragInteraction, sessionDidMove session: UIDragSession)

Page 131: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Adding items

Touch 2

Time

Stays Down MovesTouch Begins

Dragand Drop

DragLift

Page 132: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Adding items

Touch 2

Time

Stays Down Moves

Tap

Touch Begins

Dragand Drop

DragLift

Page 133: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Adding items

Touch 2

Time

Stays Down Moves

Tap

Touch Begins

Get items to add

Dragand Drop

DragLift

Page 134: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Adding items during the session

func dragInteraction(_ interaction: UIDragInteraction, itemsForAddingTo session: UIDragSession, withTouchAt point: CGPoint) -> [UIDragItem]

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview?

Page 135: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Adding items during the session

func dragInteraction(_ interaction: UIDragInteraction, itemsForAddingTo session: UIDragSession, withTouchAt point: CGPoint) -> [UIDragItem]

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview?

Page 136: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate Adding items during the session

func dragInteraction(_ interaction: UIDragInteraction, itemsForAddingTo session: UIDragSession, withTouchAt point: CGPoint) -> [UIDragItem]

func dragInteraction(_ interaction:UIDragInteraction, previewForLifting item:UIDragItem, session:UIDragSession) -> UITargetedDragPreview?

Page 137: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession, willEndWith operation: UIDropOperation)

Page 138: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession, willEndWith operation: UIDropOperation)

Page 139: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends in a cancel

func dragInteraction(_ interaction: UIDragInteraction, previewForCancelling item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?

func dragInteraction(_ interaction: UIDragInteraction, item: UIDragItem, willAnimateCancelWith animator: UIDragAnimating)

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession didEndWith operation: UIDropOperation)

Page 140: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends in a cancel

func dragInteraction(_ interaction: UIDragInteraction, previewForCancelling item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?

func dragInteraction(_ interaction: UIDragInteraction, item: UIDragItem, willAnimateCancelWith animator: UIDragAnimating)

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession didEndWith operation: UIDropOperation)

Page 141: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends in a cancel

func dragInteraction(_ interaction: UIDragInteraction, previewForCancelling item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?

func dragInteraction(_ interaction: UIDragInteraction, item: UIDragItem, willAnimateCancelWith animator: UIDragAnimating)

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession didEndWith operation: UIDropOperation)

Page 142: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends in a cancel

func dragInteraction(_ interaction: UIDragInteraction, previewForCancelling item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?

func dragInteraction(_ interaction: UIDragInteraction, item: UIDragItem, willAnimateCancelWith animator: UIDragAnimating)

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession didEndWith operation: UIDropOperation)

Page 143: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends in a copy or move

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession didEndWith operation: UIDropOperation)

func dragInteraction(_ interaction: UIDragInteraction, sessionDidTransferItems session: UIDragSession)

Page 144: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends in a copy or move

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession didEndWith operation: UIDropOperation)

func dragInteraction(_ interaction: UIDragInteraction, sessionDidTransferItems session: UIDragSession)

Page 145: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag Interaction Delegate The session ends in a copy or move

func dragInteraction(_ interaction: UIDragInteraction, session: UIDragSession didEndWith operation: UIDropOperation)

func dragInteraction(_ interaction: UIDragInteraction, sessionDidTransferItems session: UIDragSession)

Page 146: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

•Drop Interaction Delegate

Page 147: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

View 1

View 2

View 3

Page 148: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

View 1

View 2

View 3

Page 149: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

View 1

View 2

View 3

Page 150: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

App BApp A

View 1

View 2

View 3

Page 151: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters the view

func dropInteraction(_ interaction: UIDropInteraction, canHandle session: UIDropSession) -> Bool { return session.canLoadObjects(ofClass: UIImage.self)}

Page 152: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters the view

func dropInteraction(_ interaction: UIDropInteraction, canHandle session: UIDropSession) -> Bool { return session.canLoadObjects(ofClass: UIImage.self)}

Page 153: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters the view

func dropInteraction(_ interaction: UIDropInteraction, canHandle session: UIDropSession) -> Bool { return session.canLoadObjects(ofClass: UIImage.self)}

Page 154: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters the view

import MobileCoreServices // for kUTTypeImagePNG

func dropInteraction(_ interaction: UIDropInteraction, canHandle session: UIDropSession) -> Bool { return session.hasItemsConforming(toTypeIdentifiers: [kUTTypeImagePNG as String]) }

Page 155: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters the view

import MobileCoreServices // for kUTTypeImagePNG

func dropInteraction(_ interaction: UIDropInteraction, canHandle session: UIDropSession) -> Bool { return session.hasItemsConforming(toTypeIdentifiers: [kUTTypeImagePNG as String]) }

Page 156: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters and exits the view

func dropInteraction(_ interaction: UIDropInteraction, sessionDidEnter session: UIDropSession)

func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal

func dropInteraction(_ interaction: UIDropInteraction, sessionDidExit session: UIDropSession)

Page 157: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters and exits the view

func dropInteraction(_ interaction: UIDropInteraction, sessionDidEnter session: UIDropSession)

func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal

func dropInteraction(_ interaction: UIDropInteraction, sessionDidExit session: UIDropSession)

Page 158: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters and exits the view

func dropInteraction(_ interaction: UIDropInteraction, sessionDidEnter session: UIDropSession)

func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal

func dropInteraction(_ interaction: UIDropInteraction, sessionDidExit session: UIDropSession)

Page 159: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session enters and exits the view

func dropInteraction(_ interaction: UIDropInteraction, sessionDidEnter session: UIDropSession)

func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal

func dropInteraction(_ interaction: UIDropInteraction, sessionDidExit session: UIDropSession)

Page 160: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Springloading When session hovers over a view

let button = UIButton() button.isSpringLoaded = true

let springLoadedInteraction = UISpringLoadedInteraction { (interaction, context) in // Activate springloading here}view.addInteraction(springLoadedInteraction)

Page 161: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Springloading When session hovers over a view

let button = UIButton() button.isSpringLoaded = true

let springLoadedInteraction = UISpringLoadedInteraction { (interaction, context) in // Activate springloading here}view.addInteraction(springLoadedInteraction)

Page 162: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Springloading When session hovers over a view

let button = UIButton() button.isSpringLoaded = true

let springLoadedInteraction = UISpringLoadedInteraction { (interaction, context) in // Activate springloading here}view.addInteraction(springLoadedInteraction)

Page 163: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Springloading When session hovers over a view

let button = UIButton() button.isSpringLoaded = true

let springLoadedInteraction = UISpringLoadedInteraction { (interaction, context) in // Activate springloading here}view.addInteraction(springLoadedInteraction)

Page 164: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session ends over a different view

func dropInteraction(_ interaction: UIDropInteraction, sessionDidEnd session: UIDropSession)

Page 165: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session ends over a different view

func dropInteraction(_ interaction: UIDropInteraction, sessionDidEnd session: UIDropSession)

Page 166: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Session ends over this view

Dragand Drop

Time

Touch Ends

Perform Drop Animations

Data Transfer

Page 167: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Drop animations

func dropInteraction(_ interaction: UIDropInteraction, previewForDropping item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?

func dropInteraction(_ interaction: UIDropInteraction, item: UIDragItem, willAnimateDropWith animator: UIDragAnimating)

func dropInteraction(_ interaction: UIDropInteraction, concludeDrop session: UIDropSession)

Page 168: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Drop animations

func dropInteraction(_ interaction: UIDropInteraction, previewForDropping item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?

func dropInteraction(_ interaction: UIDropInteraction, item: UIDragItem, willAnimateDropWith animator: UIDragAnimating)

func dropInteraction(_ interaction: UIDropInteraction, concludeDrop session: UIDropSession)

Page 169: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Drop animations

func dropInteraction(_ interaction: UIDropInteraction, previewForDropping item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?

func dropInteraction(_ interaction: UIDropInteraction, item: UIDragItem, willAnimateDropWith animator: UIDragAnimating)

func dropInteraction(_ interaction: UIDropInteraction, concludeDrop session: UIDropSession)

Page 170: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Drop animations

func dropInteraction(_ interaction: UIDropInteraction, previewForDropping item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?

func dropInteraction(_ interaction: UIDropInteraction, item: UIDragItem, willAnimateDropWith animator: UIDragAnimating)

func dropInteraction(_ interaction: UIDropInteraction, concludeDrop session: UIDropSession)

Page 171: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Data transfer

let progress = item.itemProvider.loadObject(ofClass: UImage.self) { (object, error) in // Closure is called when object or error are available}

let fractionCompleted = progress.fractionCompletedlet isFinished = progress.isFinishedprogress.cancel()

let sessionProgress = session.progress

Page 172: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Data transfer

let progress = item.itemProvider.loadObject(ofClass: UImage.self) { (object, error) in // Closure is called when object or error are available}

let fractionCompleted = progress.fractionCompletedlet isFinished = progress.isFinishedprogress.cancel()

let sessionProgress = session.progress

Page 173: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Data transfer

let progress = item.itemProvider.loadObject(ofClass: UImage.self) { (object, error) in // Closure is called when object or error are available}

let fractionCompleted = progress.fractionCompletedlet isFinished = progress.isFinishedprogress.cancel()

let sessionProgress = session.progress

Page 174: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Data transfer

let progress = item.itemProvider.loadObject(ofClass: UImage.self) { (object, error) in // Closure is called when object or error are available}

let fractionCompleted = progress.fractionCompletedlet isFinished = progress.isFinishedprogress.cancel()

let sessionProgress = session.progress

Page 175: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Data transfer

let progress = item.itemProvider.loadObject(ofClass: UImage.self) { (object, error) in // Closure is called when object or error are available}

let fractionCompleted = progress.fractionCompletedlet isFinished = progress.isFinishedprogress.cancel()

let sessionProgress = session.progress

Page 176: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drop Interaction Delegate Data transfer

let progress = item.itemProvider.loadObject(ofClass: UImage.self) { (object, error) in // Closure is called when object or error are available}

let fractionCompleted = progress.fractionCompletedlet isFinished = progress.isFinishedprogress.cancel()

let sessionProgress = session.progress

Page 177: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Drag and Drop Timeline

Dragand Drop

Time

Stays Down Moves Ends

DragLift Perform Drop Animations

Data Transfer

Cancel Animations

Touch Begins

or

Page 178: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Interaction Delegates Essential functions

func dragInteraction(_ interaction: UIDragInteraction, itemsForBeginning session: UIDragSession) -> [UIDragItem]

func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal

func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession)

Page 179: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

To customize drag and drop, use the interaction delegates.

Page 180: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Emanuele Rudel, UIKit Engineer

•Demo

Page 181: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Next Steps

Page 182: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Next Steps

Explore the system

Page 183: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Next Steps

Explore the system

Try adding a drop target

Page 184: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Next Steps

Explore the system

Try adding a drop target

Enable a drag source

Page 185: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Next Steps

Explore the system

Try adding a drop target

Enable a drag source

Spring load some of your controls

Page 186: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Next Steps

Explore the system

Try adding a drop target

Enable a drag source

Spring load some of your controls

Dig deeper into the Drag and Drop APIs

Page 187: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Explore the APIs

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 188: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Mastering Drag and Drop Executive Ballroom Wednesday 11:00AM

Explore the APIs

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 189: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Explore the APIs

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 190: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Explore the APIs

Data Delivery with Drag and Drop Hall 2 Thursday 10:00AM

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 191: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Explore the APIs

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 192: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Explore the APIs

UICollectionView UITableView UITextView UITextField WKWebView

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 193: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Explore the APIs

UICollectionView UITableView UITextView UITextField WKWebView

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 194: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Explore the APIs

UICollectionView UITableView UITextView UITextField WKWebView

Drag and Drop with Collection and Table View Hall 2 Thursday 9:00AM

ItemProvider

DropSession

DragSession

DragInteraction

Drag Interaction Delegate Drag Item

Preview Drop Interaction

Drop Interaction Delegate

Page 195: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

More Informationhttps://developer.apple.com/wwdc17/203

90

Page 196: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Related Sessions

Mastering Drag and Drop Executive Ballroom Wednesday 11:00AM

Data Delivery with Drag and Drop Hall 2 Thursday 10:00AM

Drag and Drop with Collection and Table View Hall 2 Thursday 9:00AM

File Provider Enhancements Hall 3 Friday 11:00AM

What's New in Core Spotlight for iOS and macOS Grand Ballroom B Thursday 4:10PM

91

Page 197: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

Labs

92

UIKit and Drag and Drop Lab Technology Lab C Tues 1:50–4:10PM

Cocoa Touch Lab Technology Lab I Wed 3:10–6:00PM

UIKit and Collection View Lab Technology Lab B Thur 11:00AM–12:30PM

Cocoa Touch and Haptics Lab Technology Lab C Fri 12:00–1:50PM

Page 198: 203 Introduction to Drag and Drop 02 D...Drag and Drop on iOS Goals A great Multi-Touch experience • The interface is live • Deep integration with all of iOS • Great visual feedback

93