Questions tagged [uicontextmenuconfiguration]
14 questions
5
votes
0 answers
WKWebView won’t show custom UIContextMenuConfiguration for images
I’m trying to create a custom context menu for my WKWebView on iOS 13. I’m able to override the default context menu for normal links, however, when I tap and hold on an image, the default context menu shows.
Here is the code I have:
-(void)…

s1ris
- 51
- 4
4
votes
0 answers
Animation Glitch When Deleting UICollectionViewDiffableDataSource Item From Context Menu
I have adopted the new UICollectionViewDiffableDataSource. I am applying a datasource snapshot everytime I delete an item:
var snapshot = NSDiffableDataSourceSnapshot

Stephen
- 1,427
- 1
- 17
- 42
3
votes
3 answers
How to hide UIContextMenuInteraction/UITargetedPreview black background?
I want to add UIContextMenuInteraction to a UIView with some transparent parts. When user interact with this view, iOS shows this view with a black background.
Is it possible to make those parts transparent or change the color?

Ali Samaiee
- 301
- 6
- 14
3
votes
1 answer
Click preview to show destination VC
I've tried to implement a new UIContextMenuConfiguration to my tableView based app. I've also added a new delegate methods as shown below. It's works well, but I would like add a feature something like native iOS 13 apps. Click Preview to show…

Mannopson
- 2,634
- 1
- 16
- 32
2
votes
1 answer
How do I prevent UIScrollView from zooming in a ton when activating an iOS 13 context menu?
If you have a UIScrollView that you can zoom into, and you add an iOS 13 context menu interaction to the view inside the scroll view (eg: a UIImageView), when you perform the interaction it weirdly zooms into the image momentarily, then zooms it out…

christianselig
- 405
- 4
- 17
1
vote
0 answers
Remove shadow from UIContextMenu so it doesn‘t shows in the dismiss animation Swift
In my app I have a UITableView with text messages in it. I already implemented context menus for it so it shows quick actions for a message when you press on it. My only problem is that when the context menu preview dismisses a small shadow is shown…

Oscar Junius
- 320
- 3
- 10
1
vote
0 answers
UIDragItem causes memory leak when Context Menu has been initialised
I have a CollectionView with Drag and Drop and Context Menu functionality. There's a memory leak caused by returned [UIDragItem] array in ItemsForBeginning method when I initialise cell's context menu.
Objects are being kept in memory when I pop to…

bagmetv
- 11
- 3
1
vote
1 answer
How to disable long-press animation of context menu for CollectionView iOS Swift?
My ViewController have the three UICollectionView for all the UICollectionView I did create contextMenu, but for the last UICollectionView I am don't want to show the menu and for

Ice
- 680
- 1
- 10
- 23
1
vote
1 answer
Failed to find a presenting view controller UIContextMenuConfiguration
I have a parent that presents a child view controller.
view.addSubview(commentController.view)
addChild(commentController)
commentController.didMove(toParent: self)
Really basic stuff and everything works…

YichenBman
- 5,011
- 8
- 46
- 65
1
vote
1 answer
indexPathForRow(at: location) always [0, 0]
I have been reading around but I cannot fix this weird behavior.
I am using a UIContextMenu in a Mac Catalyst app. Whenever the user right clicks in a tableViewCell I need to get the datasource object for that row.
I have implemented the…

Ivan Cantarino
- 3,058
- 4
- 34
- 73
0
votes
0 answers
UIContextMenu not appearing when UITableViewCell also contains a UIButton
I am creating a simple to do list app and the UITableViewCell has a checkmark button in it along with a title. When clicking the checkmark button, the done status changes and the cell UI updates.
I also would like to utilise the long press gesture…

Adam Milliken
- 1
- 1
0
votes
0 answers
UIContextMenuConfiguration shows multiple table view rows
I have tableview with sections, items grouped by sections. Trying to present context menu:
func tableView(_ tableView: UITableView, contextMenuConfigurationForRowAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? {
…

ArisRS
- 1,362
- 2
- 19
- 41
0
votes
1 answer
Constraints reactivate when contextMenu appears
I am using UIContextMenuConfiguration for actions on a collection view cell. Everything works exactly as expected, however if my cell has (de)activated constraints from nib, it refreshes upon long press.
To demonstrate the problem, I have created a…

MMujtabaRoohani
- 483
- 4
- 19
0
votes
1 answer
Xcode Error trying to subclass UIContextMenuConfiguration
I'm getting Xcode compiler error when trying to subclass UIContextMenuConfiguration.
Here's simple code that reproduces the problem:
@available(iOS 13.0, *)
class DateDifferenceContextMenu: UIContextMenuConfiguration {
init(indexPath: IndexPath,…

Phantom59
- 947
- 1
- 8
- 19