Mastering Drag and Drop

Size: px
Start display at page:

Download "Mastering Drag and Drop"

Transcription

1 Session App Frameworks #WWDC17 Mastering Drag and Drop 213 Tom Adriaenssen, UIKit Wenson Hsieh, WebKit Robb Böhnke, UIKit 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

2 NEW

3 Drag and Drop API Roadmap Drag Interaction Preview Drop Interaction Drag Interaction Delegate Drag Session Drag Item Drop Session Drop Interaction Delegate Item Provider

4 Drag and Drop API Roadmap Drag Interaction Preview Drop Interaction Drag Interaction Delegate Drag Session Drag Item Drop Session Drop Interaction Delegate Item Provider Drag and Drop with Collection and Table View Hall 2 Thursday 9:00AM

5 Drag and Drop API Roadmap Drag Interaction Preview Drop Interaction Drag Interaction Delegate Drag Session Drag Item Drop Session Drop Interaction Delegate Item Provider Data Delivery with Drag and Drop Hall 2 Thursday 10:00AM

6 Drag and Drop API Roadmap Drag Interaction Preview Drop Interaction Drag Interaction Delegate Drag Session Drag Item Drop Session Drop Interaction Delegate Item Provider

7 Drag and Drop API Roadmap Drag Interaction Preview Drop Interaction Drag Interaction Delegate Drag Session Drag Item Drop Session Drop Interaction Delegate Item Provider

8 Advanced Drag Interactions Robb Böhnke, UIKit

9 UIDragInteraction Can be added to any view Installs gestures Delegate does the work

10 UIDragInteractionDelegate Returns UIDragItems associated with the drag May provide a preview during the lift or for cancelling May can animate alongside the lift May get notified of drag session lifecycle

11 UIDragInteractionDelegate Returns UIDragItems associated with the drag May provide a preview during the lift or for cancelling May can animate alongside the lift May get notified of drag session lifecycle Introducing Drag and Drop Hall 3 Tuesday 11:20AM

12

13

14 // UIDragInteractionDelegate

15 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] {

16 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { let itemprovider = NSItemProvider(message)

17 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { let itemprovider = NSItemProvider(message) let dragitem = UIDragItem(itemProvider: itemprovider)

18 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { let itemprovider = NSItemProvider(message) let dragitem = UIDragItem(itemProvider: itemprovider) dragitem.localobject = message

19 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { let itemprovider = NSItemProvider(message) let dragitem = UIDragItem(itemProvider: itemprovider) dragitem.localobject = message return [ dragitem ] }DontDeleteThis

20 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforaddingto session: UIDragSession, withtouchat point: CGPoint) -> [UIDragItem] { let itemprovider = NSItemProvider(message) let dragitem = UIDragItem(itemProvider: itemprovider) dragitem.localobject = message return [ dragitem ] }DontDeleteThis

21 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforaddingto session: UIDragSession, withtouchat point: CGPoint) -> [UIDragItem] { let itemprovider = NSItemProvider(message) let dragitem = UIDragItem(itemProvider: itemprovider) dragitem.localobject = message return [ dragitem ] }DontDeleteThis

22 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforaddingto session: UIDragSession, withtouchat point: CGPoint) -> [UIDragItem] { for item in session.items { guard item.itemprovider.hasitemconformingtotypeidentifier("private.example.mail") else { return [] } } let itemprovider = NSItemProvider(message) let dragitem = UIDragItem(itemProvider: itemprovider) dragitem.localobject = message return [ dragitem ] }DontDeleteThis

23 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforaddingto session: UIDragSession, withtouchat point: CGPoint) -> [UIDragItem] { for item in session.items { guard item.itemprovider.hasitemconformingtotypeidentifier("private.example.mail") else { return [] } guard item.localobject!= message { return [] } } let itemprovider = NSItemProvider(message) let dragitem = UIDragItem(itemProvider: itemprovider) dragitem.localobject = message return [ dragitem ] }DontDeleteThis

24

25

26 // UIDragInteractionDelegate

27 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] {

28 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { return mailthread.messages

29 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { return mailthread.messages.sorted { a, b in } return a.sentdate.timeintervalsince1970 > b.sentdate.timeintervalsince1970

30 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { return mailthread.messages.sorted { a, b in } return a.sentdate.timeintervalsince1970 > b.sentdate.timeintervalsince1970.map { message -> UIDragItem in let itemprovider = NSItemProvider(message) let dragitem = UIDragItem(itemProvider: itemprovider) } } dragitem.localobject = message return dragitem

31 // UIDragInteractionDelegate

32 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, previewforlifting item: UIDragItem, session: UIDragSession) -> UITargetedDragPreview?

33 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, previewforlifting item: UIDragItem, session: UIDragSession) -> UITargetedDragPreview? guard let message = item.localobject as? Message else { } return nil

34 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, previewforlifting item: UIDragItem, session: UIDragSession) -> UITargetedDragPreview? guard let message = item.localobject as? Message else { } return nil } return UITargetedDragPreview(view: getmessageview(for: message))

35

36

37 // UIDragInteractionDelegate

38 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { let itemprovider = NSItemProvider(file)

39 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { let itemprovider = NSItemProvider(file) // Available in the next seed itemprovider.preferredpresentationsize = CGSize(width: 400, height: 300)

40 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, itemsforbeginning session: UIDragSession) -> [UIDragItem] { let itemprovider = NSItemProvider(file) // Available in the next seed itemprovider.preferredpresentationsize = CGSize(width: 400, height: 300) } let dragitem = UIDragItem(itemProvider: itemprovider) return [ dragitem ]

41 Demo Wenson Hsieh, WebKit

42 Customizing Drag Visuals Robb Böhnke, UIKit

43 Animating Alongside the Lift The view being lifted is live Lift is interactive

44 // UIDragInteractionDelegate

45 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, willanimateliftwith animator: UIDragAnimating, session: UIDragSession) {

46 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, willanimateliftwith animator: UIDragAnimating, session: UIDragSession) { session.items.lazy

47 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, willanimateliftwith animator: UIDragAnimating, session: UIDragSession) { session.items.lazy.flatmap { $0.localObject as? Message }

48 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, willanimateliftwith animator: UIDragAnimating, session: UIDragSession) { session.items.lazy.flatmap { $0.localObject as? Message }.map(getmessageview)

49 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, willanimateliftwith animator: UIDragAnimating, session: UIDragSession) { session.items.lazy.flatmap { $0.localObject as? Message }.map(getmessageview).foreach { messageview in

50 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, willanimateliftwith animator: UIDragAnimating, session: UIDragSession) { session.items.lazy.flatmap { $0.localObject as? Message }.map(getmessageview).foreach { messageview in animator.addanimations { } messageview.overlay.alpha = 0

51 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, willanimateliftwith animator: UIDragAnimating, session: UIDragSession) { session.items.lazy.flatmap { $0.localObject as? Message }.map(getmessageview).foreach { messageview in animator.addanimations { } messageview.overlay.alpha = 0 animator.addcompletion { position in messageview.overlay.alpha = 1 } } }

52 UITargetedDragPreview

53 UITargetedDragPreview View

54 UITargetedDragPreview View Parameters

55 UITargetedDragPreview View Parameters Target

56 UITargetedDragPreview View Parameters Target

57 UIDragPreviewParameters Can color the background behind the view Knows which portion of the preview is visible

58 UIDragPreviewParameters

59 UIDragPreviewParameters

60 UIDragPreviewParameters

61 UIDragPreviewParameters

62 UIDragPreviewParameters (592, 286)

63 UIDragPreviewParameters (592, 286)

64 UIDragPreviewParameters

65 UIDragPreviewParameters

66 UIDragPreviewParameters

67 UIDragPreviewParameters (-50, -50)

68 UIDragPreviewParameters

69 UIDragPreviewParameters Can color the background behind the view Knows which portion of the preview is visible Special style for text

70 UITargetedDragPreview View Parameters Target

71 UIDragPreviewTarget Knows where the preview is going to or coming from Positions the preview inside its container May apply a transform during set down

72 Positioning with a Target

73 Positioning with a Target

74 Positioning with a Target

75 Positioning with a Target

76 Positioning with a Target

77 Positioning with a Target

78 Positioning with a Target

79 Positioning with a Target

80

81

82 UIDragPreview Used to update previews while in flight Does not have a target

83 // UIDragInteractionDelegate

84 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, sessiondidmove session: UIDragSession) {

85 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, sessiondidmove session: UIDragSession) { guard!listview.bounds.contains(session.location(in: listview)) else { return }

86 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, sessiondidmove session: UIDragSession) { guard!listview.bounds.contains(session.location(in: listview)) else { return } for item in session.items where item.localobject is Message {

87 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, sessiondidmove session: UIDragSession) { guard!listview.bounds.contains(session.location(in: listview)) else { return } for item in session.items where item.localobject is Message { guard!updateditems.contains(item) else { continue }

88 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, sessiondidmove session: UIDragSession) { guard!listview.bounds.contains(session.location(in: listview)) else { return } for item in session.items where item.localobject is Message { guard!updateditems.contains(item) else { continue } item.previewprovider = {

89 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, sessiondidmove session: UIDragSession) { guard!listview.bounds.contains(session.location(in: listview)) else { return } for item in session.items where item.localobject is Message { guard!updateditems.contains(item) else { continue } item.previewprovider = { let imageview = UIImageView(image: UIImage(named: "envelope"))

90 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, sessiondidmove session: UIDragSession) { guard!listview.bounds.contains(session.location(in: listview)) else { return } for item in session.items where item.localobject is Message { guard!updateditems.contains(item) else { continue } item.previewprovider = { let imageview = UIImageView(image: UIImage(named: "envelope")) } return UIDragPreview(view: imageview)

91 // UIDragInteractionDelegate func draginteraction(_ interaction: UIDragInteraction, sessiondidmove session: UIDragSession) { guard!listview.bounds.contains(session.location(in: listview)) else { return } for item in session.items where item.localobject is Message { guard!updateditems.contains(item) else { continue } item.previewprovider = { let imageview = UIImageView(image: UIImage(named: "envelope")) } return UIDragPreview(view: imageview) updateditems.add(item) } }

92 Demo Wenson Hsieh, WebKit

93 Deep Dive into a Drop Tom Adriaenssen, UIKit

94 Deep Dive into a Drop Drop sessions Performing a drop

95 Drop Sessions

96 Drop Sessions Your access to all things drop Drag location Items Configuration Drag session (when local)

97 Drop Sessions

98 Drop Sessions One interaction + delegate = one active drop session

99 Drop Sessions One interaction + delegate = one active drop session Supporting more sessions? Add more interactions Set interaction.allowssimultaneousdropsessions = true

100 Drop Sessions Lifetime

101 Drop Sessions Lifetime

102 Drop Sessions Lifetime can handle? optional func dropinteraction(_ interaction: UIDropInteraction, canhandle session: UIDropSession) -> Bool

103 Drop Sessions Lifetime can handle? optional func dropinteraction(_ interaction: UIDropInteraction, canhandle session: UIDropSession) -> Bool

104 Drop Sessions Lifetime can handle? enter optional func dropinteraction(_ interaction: UIDropInteraction, sessiondidenter session: UIDropSession)

105 Drop Sessions Lifetime can handle? enter update optional func dropinteraction(_ interaction: UIDropInteraction, sessiondidupdate session: UIDropSession) -> UIDropProposal

106 Drop Sessions Lifetime can handle? enter update drop

107 Drop Sessions Lifetime can handle? enter update drop end optional func dropinteraction(_ interaction: UIDropInteraction, sessiondidend session: UIDropSession)

108 Drop Sessions Lifetime can handle? enter update drop end

109 Drop Sessions Lifetime can handle? enter update drop end

110 Drop Sessions Lifetime can handle? enter update drop exit end optional func dropinteraction(_ interaction: UIDropInteraction, sessiondidexit session: UIDropSession)

111 Drop Sessions Lifetime can handle? enter update drop exit end optional func dropinteraction(_ interaction: UIDropInteraction, sessiondidend session: UIDropSession)

112 Drop Sessions Lifetime can handle? enter update drop exit end

113 Drop Sessions Lifetime can handle? enter update drop exit end

114 Drop Sessions Lifetime can handle? enter update drop exit end

115 Drop Sessions Lifetime can handle? enter update drop exit end

116 Drop Sessions Lifetime can handle? enter update drop exit end

117 Drop Sessions Lifetime can handle? enter update drop exit end

118 Drop Sessions Lifetime drop update proposal

119 Drop Sessions Lifetime update drop proposal

120 Drop Proposals class UIDropProposal : NSObject, NSCopying { init(operation: UIDropOperation) var operation: UIDropOperation { get } var isprecise: Bool var prefersfullsizepreview: Bool }

121 Drop Proposals Precision mode class UIDropProposal : NSObject, NSCopying { init(operation: UIDropOperation) var operation: UIDropOperation { get } var isprecise: Bool var prefersfullsizepreview: Bool }

122

123

124 Drop Proposals Preview scaling class UIDropProposal : NSObject, NSCopying { init(operation: UIDropOperation) var operation: UIDropOperation { get } var isprecise: Bool var prefersfullsizepreview: Bool }

125 Drop Proposals Preview scaling class UIDropProposal : NSObject, NSCopying { init(operation: UIDropOperation) var operation: UIDropOperation { get } var isprecise: Bool var prefersfullsizepreview: Bool }

126 Drop Proposals Preview scaling class UIDropProposal : NSObject, NSCopying { init(operation: UIDropOperation) var operation: UIDropOperation { get } var isprecise: Bool var prefersfullsizepreview: Bool }

127

128

129 Drop Proposals Preview scaling System prefers to scale down all previews Prefer full-size previews when it makes sense

130 Drop Proposals Preview scaling System prefers to scale down all previews Prefer full-size previews when it makes sense optional func draginteraction(_ interaction: UIDragInteraction, prefersfullsizepreviewsfor session: UIDragSession) -> Bool class UIDropProposal : NSObject, NSCopying { var prefersfullsizepreview: Bool }

131 Drop Proposals Preview scaling

132 Drop Proposals Preview scaling Flocks always scale A single preview will always scale once it leaves the source app Once scaled down, a preview never scales back up

133 Performing a Drop time

134 Performing a Drop time performdrop optional func dropinteraction(_ interaction: UIDropInteraction, performdrop session: UIDropSession)

135 Performing a Drop time performdrop loadobject() Only time when you can request data Always asynchronous loadobject() Don t block! optional func dropinteraction(_ interaction: UIDropInteraction, performdrop session: UIDropSession)

136 Performing a Drop performdrop animate time loadobject() loadobject()

137 57 Performing a Drop performdrop animate concludedrop time loadobject() loadobject()

138 57 Performing a Drop performdrop animate concludedrop time loadobject() loadobject() optional func dropinteraction(_ interaction: UIDropInteraction, concludedrop session: UIDropSession)

139 58 Performing a Drop performdrop animate concludedrop time loadobject() loadobject()

140 Performing a Drop Loading homogeneous data

141 Performing a Drop Loading homogeneous data Use session s loadobjects(ofclass:completion:) Load all objects conforming to a class Resulting array is sorted same as session s items array Completion block will be called on main queue

142 Performing a Drop Loading heterogeneous data

143 Performing a Drop Loading heterogeneous data Iterate over session items and load each item individually loadobject(), loaddatarepresentation(), loadfilerepresentation(), Fine-grained control Load multiple representations Completion block will be called on background queue

144 Performing a Drop Loading heterogeneous data Iterate over session items and load each item individually loadobject(), loaddatarepresentation(), loadfilerepresentation(), Fine-grained control Load multiple representations Completion block will be called on background queue Data Delivery with Drag and Drop Hall 2 Thursday 10:00AM

145 Demo Wenson Hsieh, WebKit

146 Drop Previews and Animations Tom Adriaenssen, UIKit

147 63 Drop Previews time performdrop animate concludedrop loadobject() loadobject()

148 64 Drop Previews time performdrop animate concludedrop loadobject() loadobject()

149 65 Drop Previews performdrop previewfordropping concludedrop time loadobject() loadobject()

150 65 Drop Previews performdrop previewfordropping concludedrop time loadobject() loadobject() optional func dropinteraction(_ interaction: UIDropInteraction, previewfordropping item: UIDragItem, withdefault defaultpreview: UITargetedDragPreview?) -> UITargetedDragPreview?

151 65 Drop Previews performdrop previewfordropping concludedrop time loadobject() preview loadobject() preview optional func dropinteraction(_ interaction: UIDropInteraction, previewfordropping item: UIDragItem, withdefault defaultpreview: UITargetedDragPreview?) -> UITargetedDragPreview?

152 66 Drop Previews performdrop previewfordropping willanimatedrop concludedrop time loadobject() preview loadobject() preview

153 66 Drop Previews performdrop previewfordropping willanimatedrop concludedrop time loadobject() preview loadobject() preview optional func dropinteraction(_ interaction: UIDropInteraction, item: UIDragItem, willanimatedropwith animator: UIDragAnimating)

154 Drop Previews time performdrop previewfordropping willanimatedrop concludedrop loadobject() loadobject() preview preview

155 Drop Previews time performdrop previewfordropping willanimatedrop concludedrop loadobject() loadobject() preview preview optional func dropinteraction(_ interaction: UIDropInteraction, concludedrop session: UIDropSession)

156 Drop Previews time performdrop previewfordropping willanimatedrop concludedrop loadobject() loadobject() preview preview

157 Drop Previews and Cancel Previews optional func dropinteraction(_ interaction: UIDropInteraction, previewfordropping item: UIDragItem, withdefault defaultpreview: UITargetedDragPreview?) -> UITargetedDragPreview? optional func draginteraction(_ interaction: UIDragInteraction, previewforcancelling item: UIDragItem, withdefault defaultpreview: UITargetedDragPreview) -> UITargetedDragPreview?

158 Drop Previews and Cancel Previews optional func dropinteraction(_ interaction: UIDropInteraction, previewfordropping item: UIDragItem, withdefault defaultpreview: UITargetedDragPreview?) -> UITargetedDragPreview? optional func draginteraction(_ interaction: UIDragInteraction, previewforcancelling item: UIDragItem, withdefault defaultpreview: UITargetedDragPreview) -> UITargetedDragPreview?

159 Drop Previews and Cancel Previews optional func dropinteraction(_ interaction: UIDropInteraction, previewfordropping item: UIDragItem, withdefault defaultpreview: UITargetedDragPreview?) -> UITargetedDragPreview? optional func draginteraction(_ interaction: UIDragInteraction, previewforcancelling item: UIDragItem, withdefault defaultpreview: UITargetedDragPreview) -> UITargetedDragPreview? Same approach Different occasions

160 Drop and Cancel Previews Animating alongside optional func dropinteraction(_ interaction: UIDropInteraction, item: UIDragItem, willanimatedropwith animator: UIDragAnimating) optional func draginteraction(_ interaction: UIDragInteraction, item: UIDragItem, willanimatecancelwith animator: UIDragAnimating)

161 Drop and Cancel Previews Animating alongside optional func dropinteraction(_ interaction: UIDropInteraction, item: UIDragItem, willanimatedropwith animator: UIDragAnimating) optional func draginteraction(_ interaction: UIDragInteraction, item: UIDragItem, willanimatecancelwith animator: UIDragAnimating) Called for each item in the flock Similar in API to UIViewPropertyAnimator

162 Drop and Cancel Previews Animating alongside optional func dropinteraction(_ interaction: UIDropInteraction, item: UIDragItem, willanimatedropwith animator: UIDragAnimating) optional func draginteraction(_ interaction: UIDragInteraction, item: UIDragItem, willanimatecancelwith animator: UIDragAnimating) Called for each item in the flock Similar in API to UIViewPropertyAnimator

163 Drop and Cancel Previews

164 Drop and Cancel Previews Return defaultpreview

165 Drop and Cancel Previews Return defaultpreview Return nil

166 Drop and Cancel Previews Return defaultpreview Return nil Retarget the defaultpreview

167 Drop and Cancel Previews Return defaultpreview Return nil Retarget the defaultpreview Make your own preview

168 Drop and Cancel Previews Some limits

169 Drop and Cancel Previews Some limits Fewer items Preview for each item Alongside animations for each item

170 Drop and Cancel Previews Some limits Fewer items Preview for each item Alongside animations for each item More items Default previews for all One alongside animation

171 Demo Wenson Hsieh, WebKit

172 Dealing with Slow Data Delivery Tom Adriaenssen, UIKit

173 Dealing with Slow Data Delivery Data loads are always asynchronous Disconnected timelines Data loading Animating drop previews

174 76 Dealing with Slow Data Delivery performdrop previewfordropping willanimatedrop concludedrop time loadobject() preview loadobject() preview

175

176

177 Dealing with Slow Data Delivery Handling cancelling Load completion blocks Data will be nil Error will be set

178 Dealing with Slow Data Delivery Handling cancelling Session and items provide progress reporting Session is ProgressReporting Item provider load methods return Progress Use Progress.cancellationHandler

179 Dealing with Slow Data Delivery Handling cancelling Session and items provide progress reporting Session is ProgressReporting session ProgressReporting Item provider load methods return Progress Use Progress.cancellationHandler

180 Dealing with Slow Data Delivery Handling cancelling Session and items provide progress reporting Session is ProgressReporting Item provider load methods return Progress Use Progress.cancellationHandler session ProgressReporting loadobject() Progress loaddatarepresentation() Progress loadfilerepresentation() Progress

181 Dealing with Slow Data Delivery Showing custom progress session ProgressReporting loadobject() Progress loaddatarepresentation() Progress loadfilerepresentation() Progress

182 Dealing with Slow Data Delivery Showing custom progress session.progressindicatorstyle =.none session ProgressReporting loadobject() Progress loaddatarepresentation() Progress loadfilerepresentation() Progress

183 Dealing with Slow Data Delivery Showing custom progress session.progressindicatorstyle =.none session ProgressReporting Observe progress session.progress Per item: Progress returned by item provider Allow the user to cancel the transfer loadobject() Progress loaddatarepresentation() Progress loadfilerepresentation() Progress

184 But how can I generate a preview if I don t have any data?

185 Dealing with Slow Data Delivery Previews without data

186 Dealing with Slow Data Delivery Previews without data Use and retarget the default previews

187 Dealing with Slow Data Delivery Previews without data Use and retarget the default previews Make a placeholder/progress preview Drag and Drop with Collection and Table View Hall 2 Thursday 9:00AM

188 Dealing with Slow Data Delivery Previews without data Use and retarget the default previews Make a placeholder/progress preview Never assume the data will be there Drag and Drop with Collection and Table View Hall 2 Thursday 9:00AM

189 Dealing with Slow Data Delivery Previews without data Use and retarget the default previews Make a placeholder/progress preview Never assume the data will be there Always account for the worst case Drag and Drop with Collection and Table View Hall 2 Thursday 9:00AM

190

191

192 Improved In-App Experience by Adding Drag and Drop

193 Improved In-App Experience Local drag and drop protocol UIDropSession : UIDragDropSession, ProgressReporting { var localdragsession: UIDragSession? { get } }

194 Improved In-App Experience Local drag and drop protocol UIDropSession : UIDragDropSession, ProgressReporting { var localdragsession: UIDragSession? { get } } Access to corresponding drag session nil for cross-app drags

195 Improved In-App Experience Local drag and drop class UIDragItem : NSObject { var localobject: Any? } var itemprovider: NSItemProvider { get }

196 Improved In-App Experience Local drag and drop class UIDragItem : NSObject { var localobject: Any? } var itemprovider: NSItemProvider { get } App-local data carrier State for drag Transfer data between views Provider fallback item provider (if drag can go outside app)

197 Improved In-App Experience Local drag and drop protocol UIDragSession : UIDragDropSession { var localcontext: Any? { get set } }

198 Improved In-App Experience Local drag and drop protocol UIDragSession : UIDragDropSession { var localcontext: Any? { get set } } Usable for state that applies to this drag session only

199 Improved In-App Experience Local drag and drop optional func draginteraction(_ interaction: UIDragInteraction, sessionisrestrictedtodraggingapplication session: UIDragSession) -> Bool // default: false var isrestrictedtodraggingapplication: Bool { get } Restrict drag sessions to local application Drop interactions in other apps won t see the session

200 Improved In-App Experience Local drag and drop optional func draginteraction(_ interaction: UIDragInteraction, sessionisrestrictedtodraggingapplication session: UIDragSession) -> Bool // default: false var isrestrictedtodraggingapplication: Bool { get } Restrict drag sessions to local application Drop interactions in other apps won t see the session

201 Improved In-App Experience Local drag and drop optional func draginteraction(_ interaction: UIDragInteraction, sessionisrestrictedtodraggingapplication session: UIDragSession) -> Bool // default: false var isrestrictedtodraggingapplication: Bool { get } Restrict drag sessions to local application Drop interactions in other apps won t see the session

202 Improved In-App Experience Local drag and drop optional func draginteraction(_ interaction: UIDragInteraction, sessionisrestrictedtodraggingapplication session: UIDragSession) -> Bool // default: false var isrestrictedtodraggingapplication: Bool { get } Restrict drag sessions to local application Drop interactions in other apps won t see the session

203 Improved In-App Experience Local drag and drop

204 Improved In-App Experience Local drag and drop By default drag interactions are Enabled on ipad Disabled on iphone

205 Improved In-App Experience Local drag and drop By default drag interactions are Enabled on ipad Disabled on iphone var isenabled: Bool class var isenabledbydefault: Bool { get }

206 Demo Wenson Hsieh, WebKit

207 Summary Powerful, user-driven I/O for your app Custom and stunning visuals and interactions Asynchronous nature of data Leverage Drag and Drop to improve in-app experience

208 More Information

209 Related Sessions Introducing Drag and Drop Hall 3 Tuesday 11:20AM Drag and Drop with Collection and Table View Hall 2 Thursday 9:00AM Data Delivery with Drag and Drop Hall 2 Thursday 10:00AM

210 Labs UIKit and Drag and Drop Lab Technology Lab C Tues 1:50PM-3:10PM Cocoa Touch Lab Technology Lab I Wed 3:10-6:00PM UIKit and Collection View Lab Technology Lab B Thur 10:00-12:30PM Cocoa Touch and Haptics Lab Technology Lab C Fri 12:00-1:50PM

211

212

Data Delivery with Drag and Drop

Data Delivery with Drag and Drop Session App Frameworks #WWDC17 Data Delivery with Drag and Drop 227 Dave Rahardja, UIKit Tanu Singhal, UIKit 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Modern User Interaction on ios

Modern User Interaction on ios App Frameworks #WWDC17 Modern User Interaction on ios Mastering the UIKit UIGesture System Session 219 Dominik Wagner, UIKit Engineer Michael Turner, UIKit Engineer Glen Low, UIKit Engineer 2017 Apple

More information

Enhancing your apps for the next dimension of touch

Enhancing your apps for the next dimension of touch App Frameworks #WWDC16 A Peek at 3D Touch Enhancing your apps for the next dimension of touch Session 228 Tyler Fox UIKit Frameworks Engineer Peter Hajas UIKit Frameworks Engineer 2016 Apple Inc. All rights

More information

Mastering UIKit on tvos

Mastering UIKit on tvos App Frameworks #WWDC16 Mastering UIKit on tvos Session 210 Justin Voss UIKit Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Using and Extending the Xcode Source Editor

Using and Extending the Xcode Source Editor Developer Tools #WWDC16 Using and Extending the Xcode Source Editor Session 414 Mike Swingler Xcode Infrastructure and Editors Chris Hanson Xcode Infrastructure and Editors 2016 Apple Inc. All rights reserved.

More information

Quick Interaction Techniques for watchos

Quick Interaction Techniques for watchos App Frameworks #WWDC16 Quick Interaction Techniques for watchos Session 211 Tom Witkin watchos Engineer Miguel Sanchez watchos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display

More information

Cocoa Touch Best Practices

Cocoa Touch Best Practices App Frameworks #WWDC15 Cocoa Touch Best Practices Session 231 Luke Hiesterman UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Media and Gaming Accessibility

Media and Gaming Accessibility Session System Frameworks #WWDC17 Media and Gaming Accessibility 217 Greg Hughes, Software Engineering Manager Charlotte Hill, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or public

More information

What s New in imessage Apps

What s New in imessage Apps Session App Frameworks #WWDC17 What s New in imessage Apps 234 Eugene Bistolas, Messages Engineer Jay Chae, Messages Engineer Stephen Lottermoser, Messages Engineer 2017 Apple Inc. All rights reserved.

More information

Introducing Password AutoFill for Apps

Introducing Password AutoFill for Apps Session App Frameworks #WWDC17 Introducing Password AutoFill for Apps Reducing friction for your users 206 Ricky Mondello, ios Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display

More information

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson Session App Frameworks #WWDC17 What s New in MapKit 237 Fredrik Olsson 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. MKMapView.mapType.standard

More information

What s New in Xcode App Signing

What s New in Xcode App Signing Developer Tools #WWDC16 What s New in Xcode App Signing Developing and distributing Session 401 Joshua Pennington Tools Engineering Manager Itai Rom Tools Engineer 2016 Apple Inc. All rights reserved.

More information

imessage Apps and Stickers, Part 2

imessage Apps and Stickers, Part 2 App Frameworks #WWDC16 imessage Apps and Stickers, Part 2 Interactive Messages Session 224 Alex Carter Messages Engineer Stephen Lottermoser Messages Engineer 2016 Apple Inc. All rights reserved. Redistribution

More information

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer Featured #WWDC15 Building Watch Apps Session 108 Neil Desai watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda

More information

What s New in watchos

What s New in watchos Session App Frameworks #WWDC17 What s New in watchos 205 Ian Parks, watchos Engineering 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

What s New in tvos 12

What s New in tvos 12 #WWDC18 What s New in tvos 12 Session 208 Hans Kim, tvos Engineering 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda Agenda

More information

Touch Bar Fundamentals

Touch Bar Fundamentals Session App Frameworks #WWDC17 Touch Bar Fundamentals 211 Chris Dreessen John Tegtmeyer 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility

ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility App Frameworks #WWDC15 ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Advanced Scrollviews and Touch Handling Techniques

Advanced Scrollviews and Touch Handling Techniques Frameworks #WWDC14 Advanced Scrollviews and Touch Handling Techniques Session 235 Josh Shaffer ios Apps and Frameworks Engineer Eliza Block ios Apps and Frameworks Engineer 2014 Apple Inc. All rights reserved.

More information

Building for Voice with Siri Shortcuts

Building for Voice with Siri Shortcuts #WWDC18 Building for Voice with Siri Shortcuts Session 214 Amit Jain, Siri Ayaka Nonaka, Siri 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

What s New in NSCollectionView Session 225

What s New in NSCollectionView Session 225 App Frameworks #WWDC15 What s New in NSCollectionView Session 225 Troy Stephens Application Frameworks Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

What s New in Core Data?

What s New in Core Data? Session App Frameworks #WWDC17 What s New in Core? Persisting since 2004 210 Melissa Turner, Core Engineer Rishi Verma, Core Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display

More information

Leveraging Touch Input on ios

Leveraging Touch Input on ios App Frameworks #WWDC16 Leveraging Touch Input on ios And getting the most out of Apple Pencil Session 220 Dominik Wagner UIKit Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display

More information

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility Frameworks #WWDC14 Accessibility on ios Developing for everyone Session 210 Clare Kasemset ios Accessibility 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer App Frameworks #WWDC16 What s New in tvos Session 206 Hans Kim tvos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Welcome

More information

What s New in ARKit 2

What s New in ARKit 2 Session #WWDC18 What s New in ARKit 2 602 Arsalan Malik, ARKit Engineer Reinhard Klapfer, ARKit Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Monetize and Promote Your App with iad

Monetize and Promote Your App with iad Media #WWDC15 Monetize and Promote Your App with iad From design to launch Session 503 Carol Teng Shashank Phadke 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Implementing UI Designs in Interface Builder

Implementing UI Designs in Interface Builder Developer Tools #WWDC15 Implementing UI Designs in Interface Builder Session 407 Kevin Cathey Interface Builder Engineer Tony Ricciardi Interface Builder Engineer 2015 Apple Inc. All rights reserved. Redistribution

More information

Managing Documents In Your ios Apps

Managing Documents In Your ios Apps Session #WWDC18 Managing Documents In Your ios Apps 216 Brandon Tennant, Software Engineer Thomas Deniau, Software Engineer Rony Fadel, Software Engineer 2018 Apple Inc. All rights reserved. Redistribution

More information

Building Visually Rich User Experiences

Building Visually Rich User Experiences Session App Frameworks #WWDC17 Building Visually Rich User Experiences 235 Noah Witherspoon, Software Engineer Warren Moore, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or public

More information

Introducing MusicKit. Media #WWDC17. Tim Parthemore, MusicKit Services Joel Lopes Da Silva, ios Music

Introducing MusicKit. Media #WWDC17. Tim Parthemore, MusicKit Services Joel Lopes Da Silva, ios Music Session Media #WWDC17 Introducing MusicKit 502 Tim Parthemore, MusicKit Services Joel Lopes Da Silva, ios Music 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

What's New in UIKit Dynamics and Visual Effects Session 229

What's New in UIKit Dynamics and Visual Effects Session 229 App Frameworks #WWDC15 What's New in UIKit Dynamics and Visual Effects Session 229 Michael Turner UIKit Engineer David Duncan UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public

More information

Using Grouped Notifications

Using Grouped Notifications #WWDC18 Using Grouped Notifications Session 711 Michele Campeotto, ios User Notifications 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

App Extension Best Practices

App Extension Best Practices App Frameworks #WWDC15 App Extension Best Practices Session 224 Sophia Teutschler UIKit Engineer Ian Baird CoreOS Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

Extending Your Apps with SiriKit

Extending Your Apps with SiriKit App Frameworks #WWDC16 Extending Your Apps with SiriKit Session 225 Vineet Khosla SiriKit Engineering Diana Huang SiriKit Engineering Scott Andrus SiriKit Engineering 2016 Apple Inc. All rights reserved.

More information

Getting the Most Out of HealthKit

Getting the Most Out of HealthKit App Frameworks #WWDC16 Getting the Most Out of HealthKit What s new and best practices Session 209 Matthew Salesi ios Software Engineer Joefrey Kibuule ios Software Engineer 2016 Apple Inc. All rights

More information

What s New in SpriteKit

What s New in SpriteKit Graphics and Games #WWDC16 What s New in SpriteKit Session 610 Ross Dexter Games Technologies Engineer Clément Boissière Games Technologies Engineer 2016 Apple Inc. All rights reserved. Redistribution

More information

Seamless Linking to Your App

Seamless Linking to Your App App Frameworks #WWDC15 Seamless Linking to Your App Session 509 Conrad Shultz Safari and WebKit Software Engineer Jonathan Grynspan Core Services Software Engineer 2015 Apple Inc. All rights reserved.

More information

Creating Complications with ClockKit Session 209

Creating Complications with ClockKit Session 209 App Frameworks #WWDC15 Creating Complications with ClockKit Session 209 Eliza Block watchos Engineer Paul Salzman watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display

More information

Introducing the Modern WebKit API

Introducing the Modern WebKit API Frameworks #WWDC14 Introducing the Modern WebKit API Session 206 Anders Carlsson Safari and WebKit Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Building Faster in Xcode

Building Faster in Xcode #WWDC18 Building Faster in Xcode Session 408 David Owens, Xcode Engineer Jordan Rose, Swift Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Automatic Strong Passwords and Security Code AutoFill

Automatic Strong Passwords and Security Code AutoFill Session #WWDC18 Automatic Strong Passwords and Security Code AutoFill 204 Chelsea Pugh, ios Engineer Reza Abbasian, ios Engineer Harris Papadopoulos, ios Engineer 2018 Apple Inc. All rights reserved. Redistribution

More information

Integrating Apps and Content with AR Quick Look

Integrating Apps and Content with AR Quick Look Session #WWDC18 Integrating Apps and Content with AR Quick Look 603 David Lui, ARKit Engineering Dave Addey, ARKit Engineering 2018 Apple Inc. All rights reserved. Redistribution or public display not

More information

Introduction to Siri Shortcuts

Introduction to Siri Shortcuts #WWDC8 Introduction to Siri Shortcuts Session 2 Ari Weinstein, Siri Willem Mattelaer, Siri 208 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Enabling Your App for CarPlay

Enabling Your App for CarPlay Session App Frameworks #WWDC17 Enabling Your App for CarPlay 719 Albert Wan, CarPlay Engineering 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

ios Memory Deep Dive #WWDC18 Kyle Howarth, Software Engineer James Snee, Software Engineer Kris Markel, Software Engineer

ios Memory Deep Dive #WWDC18 Kyle Howarth, Software Engineer James Snee, Software Engineer Kris Markel, Software Engineer Session #WWDC18 ios Memory Deep Dive 416 Kyle Howarth, Software Engineer James Snee, Software Engineer Kris Markel, Software Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display

More information

Designing for Apple Watch

Designing for Apple Watch Design #WWDC15 Designing for Apple Watch Session 802 Mike Stern User Experience Evangelist 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Thread Sanitizer and Static Analysis

Thread Sanitizer and Static Analysis Developer Tools #WWDC16 Thread Sanitizer and Static Analysis Help with finding bugs in your code Session 412 Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer, Program Analysis Team 2016

More information

What's New in Core Spotlight

What's New in Core Spotlight Session System Frameworks #WWDC17 What's New in Core Spotlight Search on macos and ios 231 John Hörnkvist, Spotlight Lyn Fong, Spotlight 2017 Apple Inc. All rights reserved. Redistribution or public display

More information

CarPlay Audio and Navigation Apps

CarPlay Audio and Navigation Apps #WWDC18 CarPlay Audio and Navigation Apps Tunes and turns Jonathan Hersh, ios Car Experience Albert Wan, ios Car Experience Mike Knippers, ios Car Experience 2018 Apple Inc. All rights reserved. Redistribution

More information

Mysteries of Auto Layout, Part 1

Mysteries of Auto Layout, Part 1 App Frameworks #WWDC15 Mysteries of Auto Layout, Part 1 Session 218 Jason Yao Interface Builder Engineer Kasia Wawer ios Keyboards Engineer 2015 Apple Inc. All rights reserved. Redistribution or public

More information

New UIKit Support for International User Interfaces

New UIKit Support for International User Interfaces App Frameworks #WWDC15 New UIKit Support for International User Interfaces Session 222 Sara Radi Internationalization Software Engineer Aaltan Ahmad Internationalization Software Engineer Paul Borokhov

More information

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML System Frameworks #WWDC17 Core ML in Depth Krishna Sridhar, Core ML Zach Nation, Core ML 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Accessibility on OS X

Accessibility on OS X Frameworks #WWDC14 Accessibility on OS X New Accessibility API Session 207 Patti Hoa Accessibility Engineer! Chris Dolan Accessibility Engineer 2014 Apple Inc. All rights reserved. Redistribution or public

More information

Introducing On Demand Resources

Introducing On Demand Resources App Frameworks #WWDC15 Introducing On Demand Resources An element of App Thinning Session 214 Steve Lewallen Frameworks Engineering Tony Parker Cocoa Frameworks 2015 Apple Inc. All rights reserved. Redistribution

More information

New Ways to Work with Workouts

New Ways to Work with Workouts Session #WWDC18 New Ways to Work with Workouts 707 Niharika Bedekar, Fitness Software Engineer Karim Benhmida, Health Software Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display

More information

Building Apps with Dynamic Type

Building Apps with Dynamic Type Session App Frameworks #WWDC17 Building Apps with Dynamic Type 245 Clare Kasemset, Software Engineering Manager Nandini Sundar, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or

More information

What s New in Cocoa for macos

What s New in Cocoa for macos Session #WWDC18 What s New in Cocoa for macos 209 Ali Ozer, Cocoa Frameworks Chris Dreessen, Cocoa Frameworks Jesse Donaldson, Cocoa Frameworks 2018 Apple Inc. All rights reserved. Redistribution or public

More information

Introducing PDFKit on ios

Introducing PDFKit on ios Session App Frameworks #WWDC17 Introducing PDFKit on ios PDF on macos and ios 241 Jeremy Bridon, Software Engineer Nicki Brower, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or

More information

Localizing with Xcode 9

Localizing with Xcode 9 Session Developer Tools #WWDC17 Localizing with Xcode 9 401 Sara Radi, Software Engineer Aya Siblini, Software Engineer Chris Hanson, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution

More information

Vision Framework. Building on Core ML. Media #WWDC17. Brett Keating, Apple Manager Frank Doepke, He who wires things together

Vision Framework. Building on Core ML. Media #WWDC17. Brett Keating, Apple Manager Frank Doepke, He who wires things together Session Media #WWDC17 Vision Framework Building on Core ML 506 Brett Keating, Apple Manager Frank Doepke, He who wires things together 2017 Apple Inc. All rights reserved. Redistribution or public display

More information

Creating Audio Apps for watchos

Creating Audio Apps for watchos Session #WWDC18 Creating Audio Apps for watchos 504 Neil Desai, watchos Frameworks Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Understanding Undefined Behavior

Understanding Undefined Behavior Session Developer Tools #WWDC17 Understanding Undefined Behavior 407 Fred Riss, Clang Team Ryan Govostes, Security Engineering and Architecture Team Anna Zaks, Program Analysis Team 2017 Apple Inc. All

More information

Swift API Design Guidelines

Swift API Design Guidelines Developer Tools #WWDC16 Swift API Design Guidelines The Grand Renaming Session 403 Doug Gregor Swift Engineer Michael Ilseman Swift Engineer 2016 Apple Inc. All rights reserved. Redistribution or public

More information

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017 Stanford Developing Applications for ios Today Error Handling in Swift try Extensions A simple, powerful, but easily overused code management syntax Protocols Last (but certainly not least important) typing

More information

Introducing the Contacts Framework

Introducing the Contacts Framework App Frameworks #WWDC15 Introducing the Contacts Framework For OS X, ios, and watchos Session 223 Bruce Stadnyk ios Contacts Engineer Dave Dribin OS X Contacts Engineer Julien Robert ios Contacts Engineer

More information

What s New in Foundation for Swift Session 207

What s New in Foundation for Swift Session 207 App Frameworks #WWDC16 What s New in Foundation for Swift Session 207 Tony Parker Foundation, Apple Michael LeHew Foundation, Apple 2016 Apple Inc. All rights reserved. Redistribution or public display

More information

Announcements. Today s Topics

Announcements. Today s Topics Announcements Lab 2 is due tonight by 11:59 PM Late policy is 10% of lab total per day late So -7.5 points per day late for lab 2 Labs 3 and 4 are posted on the course website Extensible Networking Platform

More information

What s New in Notifications

What s New in Notifications System Frameworks #WWDC15 What s New in Notifications Session 720 Michele Campeotto ios Notifications Gokul Thirumalai Apple Push Notification Service 2015 Apple Inc. All rights reserved. Redistribution

More information

Core Data Best Practices

Core Data Best Practices #WWDC18 Core Data Best Practices Session 224 Scott Perry, Engineer Nick Gillett, Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Creating Great App Previews

Creating Great App Previews Services #WWDC14 Creating Great App Previews Session 304 Paul Turner Sr. Operations Manager itunes Digital Supply Chain Engineering 2014 Apple Inc. All rights reserved. Redistribution or public display

More information

WatchKit In-Depth, Part 2

WatchKit In-Depth, Part 2 App Frameworks #WWDC15 WatchKit In-Depth, Part 2 Session 208 Nathan de Vries watchos Engineer Chloe Chang watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

What s New in Audio. Media #WWDC17. Akshatha Nagesh, AudioEngine-eer Béla Balázs, Audio Artisan Torrey Holbrook Walker, Audio/MIDI Black Ops

What s New in Audio. Media #WWDC17. Akshatha Nagesh, AudioEngine-eer Béla Balázs, Audio Artisan Torrey Holbrook Walker, Audio/MIDI Black Ops Session Media #WWDC17 What s New in Audio 501 Akshatha Nagesh, AudioEngine-eer Béla Balázs, Audio Artisan Torrey Holbrook Walker, Audio/MIDI Black Ops 2017 Apple Inc. All rights reserved. Redistribution

More information

Improving your Existing Apps with Swift

Improving your Existing Apps with Swift Developer Tools #WWDC15 Improving your Existing Apps with Swift Getting Swifty with It Session 403 Woody L. in the Sea of Swift 2015 Apple Inc. All rights reserved. Redistribution or public display not

More information

Getting the Most out of Playgrounds in Xcode

Getting the Most out of Playgrounds in Xcode #WWDC18 Getting the Most out of Playgrounds in Xcode Session 402 Tibet Rooney-Rabdau, Xcode Engineer Alex Brown, Core OS Engineer TJ Usiyan, Xcode Engineer 2018 Apple Inc. All rights reserved. Redistribution

More information

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall Stanford Developing Applications for ios Today Drag and Drop Transferring information around within and between apps. EmojiArt Demo Drag and drop an image to get our EmojiArt masterpieces started. UITableView

More information

Advances in AVFoundation Playback

Advances in AVFoundation Playback Media #WWDC16 Advances in AVFoundation Playback Waiting, looping, switching, widening, optimizing Session 503 Sam Bushell Media Systems Architect 2016 Apple Inc. All rights reserved. Redistribution or

More information

What s New in SiriKit

What s New in SiriKit Session App Frameworks #WWDC17 What s New in SiriKit 214 Sirisha Yerroju, SiriKit Engineer Tin Tran, SiriKit Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

SceneKit: What s New Session 604

SceneKit: What s New Session 604 Graphics and Games #WWDC17 SceneKit: What s New Session 604 Thomas Goossens, SceneKit engineer Amaury Balliet, SceneKit engineer Anatole Duprat, SceneKit engineer Sébastien Métrot, SceneKit engineer 2017

More information

Creating Content with iad JS

Creating Content with iad JS Creating Content with iad JS Part 2 The iad JS Framework Antoine Quint iad JS Software Engineer ios Apps and Frameworks 2 Agenda Motivations and Features of iad JS Core JavaScript Enhancements Working

More information

Finding Bugs Using Xcode Runtime Tools

Finding Bugs Using Xcode Runtime Tools Session Developer Tools #WWDC17 Finding Bugs Using Xcode Runtime Tools 406 Kuba Mracek, Program Analysis Engineer Vedant Kumar, Compiler Engineer 2017 Apple Inc. All rights reserved. Redistribution or

More information

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016 Stanford Developing Applications for ios Today Memory Management for Reference Types Controlling when things leave the heap Closure Capture Closures capture things into the heap too Extensions A simple,

More information

AVContentKeySession Best Practices

AVContentKeySession Best Practices Session #WWDC18 AVContentKeySession Best Practices 507 Anil Katti, AVFoundation Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

ios Configuration and APIs for Kiosk and Assessment Apps

ios Configuration and APIs for Kiosk and Assessment Apps Session Systems Framework #WWDC17 ios Configuration and APIs for Kiosk and Assessment Apps 716 Steve Hayman, Consulting Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display not

More information

What s New in Testing

What s New in Testing #WWDC18 What s New in Testing Session 403 Honza Dvorsky, Xcode Engineer Ethan Vaughan, Xcode Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

View Controller Advancements for ios8

View Controller Advancements for ios8 Frameworks #WWDC14 View Controller Advancements for ios8 Session 214 Bruce D. Nilo Manager, UIKit Fundamentals 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Getting Started with CareKit

Getting Started with CareKit App Frameworks #WWDC16 Getting Started with CareKit Session 237 Umer Khan Software Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Apple Watch Design Tips and Tricks

Apple Watch Design Tips and Tricks Design #WWDC15 Apple Watch Design Tips and Tricks Session 805 Mike Stern User Experience Evangelist Rachel Roth User Experience Evangelist 2015 Apple Inc. All rights reserved. Redistribution or public

More information

What s New in CloudKit

What s New in CloudKit System Frameworks #WWDC15 What s New in CloudKit Session 704 Olivier Bonnet icloud Client Eric Krugler icloud Server 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

Lecture 8 Demo Code: Cassini Multithreading

Lecture 8 Demo Code: Cassini Multithreading Lecture 8 Demo Code: Cassini Multithreading Objective Included below is the source code for the demo in lecture. It is provided under the same Creative Commons licensing as the rest of CS193p s course

More information

Introducing Swift Playgrounds

Introducing Swift Playgrounds Developer Tools #WWDC16 Introducing Swift Playgrounds Exploring with Swift on ipad Session 408 Matt Patenaude Playgrounds Engineer Maxwell Swadling Playgrounds Engineer Jonathan Penn Playgrounds Engineer

More information

Adopting Advanced Features of the New UI

Adopting Advanced Features of the New UI Frameworks #WWDC14 Adopting Advanced Features of the New UI Session 220 Chris Dreessen AppKit Software Engineer! Corbin Dunn AppKit Software Engineer 2014 Apple Inc. All rights reserved. Redistribution

More information

lecture 10 UI/UX and Programmatic Design cs : spring 2018

lecture 10 UI/UX and Programmatic Design cs : spring 2018 lecture 10 UI/UX and Programmatic Design cs198-001 : spring 2018 1 Announcements custom app progress form due before lab (~1 minute) will be released after lecture only 2 labs left (both very important)

More information

Designing Great Apple Watch Experiences

Designing Great Apple Watch Experiences Design #WWDC16 Designing Great Apple Watch Experiences Session 804 Mike Stern User Experience Evangelist 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

What s New in Swift Playgrounds

What s New in Swift Playgrounds Session Developer Tools #WWDC17 What s New in Swift Playgrounds 408 Connor Wakamo, Playgrounds Engineer Grace Kendall, Playgrounds Engineer Najla Bulous, Playgrounds Engineer 2017 Apple Inc. All rights

More information

Event Delivery: The Responder Chain

Event Delivery: The Responder Chain When you design your app, it s likely that you want to respond to events dynamically. For example, a touch can occur in many different objects onscreen, and you have to decide which object you want to

More information

Your Apps and the Future of macos Security

Your Apps and the Future of macos Security #WWDC18 Your Apps and the Future of macos Security Pierre-Olivier Martel, Security Engineering Manager Kelly Yancey, OS Security Garrett Jacobson, Trusted Execution 2018 Apple Inc. All rights reserved.

More information

Introducing SiriKit. Hey Siri, say hello to apps #WWDC16. App Frameworks. Session 217

Introducing SiriKit. Hey Siri, say hello to apps #WWDC16. App Frameworks. Session 217 App Frameworks #WWDC16 Introducing SiriKit Hey Siri, say hello to apps Session 217 Robby Walker SiriKit Engineering Brandon Newendorp SiriKit Engineering Corey Peterson SiriKit Design 2016 Apple Inc. All

More information

Advanced Notifications

Advanced Notifications System Frameworks #WWDC16 Advanced Notifications Session 708 Michele Campeotto ios Notifications 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Getting Published in Apple News

Getting Published in Apple News Media #WWDC16 Getting Published in Apple News Session 502 Ryan Griggs Apple News 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

More information