File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,19 @@ - (UITargetedPreview *)contextMenuInteraction:(UIContextMenuInteraction *)intera
118
118
target: previewTarget];
119
119
}
120
120
121
+ - (UITargetedPreview *)contextMenuInteraction : (UIContextMenuInteraction *)interaction previewForDismissingMenuWithConfiguration : (UIContextMenuConfiguration *)configuration API_AVAILABLE(ios(13.0 )) {
122
+ UIPreviewTarget* previewTarget = [[UIPreviewTarget alloc ] initWithContainer: self center: self .reactSubviews.firstObject.center];
123
+ UIPreviewParameters* previewParams = [[UIPreviewParameters alloc ] init ];
124
+
125
+ if (_previewBackgroundColor != nil ) {
126
+ previewParams.backgroundColor = _previewBackgroundColor;
127
+ }
128
+
129
+ return [[UITargetedPreview alloc ] initWithView: self .reactSubviews.firstObject
130
+ parameters: previewParams
131
+ target: previewTarget];
132
+ }
133
+
121
134
- (UIMenuElement*) createMenuElementForAction : (ContextMenuAction *)action atIndexPath : (NSArray <NSNumber *> *)indexPath {
122
135
UIMenuElement* menuElement = nil ;
123
136
UIImage *iconImage = nil ;
You can’t perform that action at this time.
0 commit comments