Questions tagged [uicontextualaction]

37 questions
1
vote
1 answer

UIContextualAction not displaying image on iOS 12.4, and that code works for iOS 13.4 fine

Can anyone explain how to solve that ? Here is what it shows me now on iPhone X (iOS 12.4) Here is my code below @available(iOS 11.0, *) func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) ->…
Majit U.
  • 31
  • 5
1
vote
0 answers

Auto resizing a pdf. icon image in the UIContextualAction.image doesnt seem to be working

delete.image = UIGraphicsImageRenderer(size: CGSize(width: 28, height: 28)).image(actions: { (_) in UIImage(named: "Trash Icon")?.draw(in: CGRect(x: 0, y: 0, width: 28, height: 28)) }) With CGRect, the .pdf icon is stretch and…
Kean Wei
  • 11
  • 2
1
vote
3 answers

Disable UIContextualAction

I am trying to disable a UIContextualAction that I have: let picture = UIContextualAction(style: .normal, title: " ", handler: { (ac: UIContextualAction, view: UIView, success:(Bool) -> Void) in // ... }) picture.backgroundColor = .blue I…
user979331
  • 11,039
  • 73
  • 223
  • 418
1
vote
1 answer

Row in UITableView isn't deleted immediately

I'm using trailingSwipeActionsConfigurationForRowAt UITableView's delegate method for handling when user swipe to delete certain cell (item). My UIContextualAction for delete event looks like this. I first remove item from Realm database and then I…
1
vote
1 answer

TrailingSwipeAction: How to deactivate auto delete on swipe through?

I update my tablerowactions to the swift 4 equivalent to be able to set icons instead of text as the buttons that show when the user swipes left on a table-element. My problem is that the first defined action (in my case the delete action)…
1
vote
3 answers

iOS TableView swipe UIContextualAction can not get a right image

I want to set a image in the left swipe of cell, there is the code, but It doesn't work. - (UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath { if (@available…
1
vote
0 answers

How do I get the image of the UIContextualAction button to display properly?

I made an image for the button of a UIContexualAction using sketch but when I loaded the image onto a tableViewCell, the image turned out like below. This is the code that was added to the UIContextualAction. let action =…
Kauna Mohammed
  • 797
  • 1
  • 6
  • 14
1
vote
0 answers

Delphi + iOS: how to implement UIContextualActionHandler in Delphi/FMX?

The iOS 11 SDK introduces two new UITableView methods for handling swipe actions: leadingSwipeActionsConfigurationForRowAtIndexPath trailingSwipeActionsConfigurationForRowAtIndexPath Objective-C: - (nullable UISwipeActionsConfiguration…
vitaliy-zh
  • 185
  • 9
0
votes
0 answers

How to show UIMenu with Trailing Swipe Action(UIContextualAction)?

I want to show a Menu with UIContextualAction. I know I cannot modify it that much so I decided to add a button when in UIContextualAction Handler and then press it programatically to show the menu. First instead of menu I decided to print or show a…
0
votes
0 answers

how to use an UIContextualAction in a cell to send CoreData strings to an textfield placeholder

I have a list in a tableview. The cells are filled with data from CoreData. To add new data I have another ViewController. To send the CoreDataContainer to the next ViewController: override func prepare(for segue: UIStoryboardSegue, sender: Any?)…
Guenni
  • 1
  • 1
0
votes
0 answers

iOS: is There anyway to customise default contextual menu in iOS, I want to change the image/icon positions to the left?

Please find the below code,This is the code I am using it, I tried forceRight to left to customise it, but this is not helping. from iOS 15 we have some Contextual menu thing by iOS UIkit, let interaction = UIContextMenuInteraction(delegate:…
0
votes
1 answer

Swift UISwipeActionsConfiguration and segue

I added leadingSwipeAction "Edit" button. However, when i press "Edit" button in simulator, app crashes and shows "Thread 1: signal SIGBART" in **prepare(for:sender:)**method. I saw similar questions, but their solutions did't help. I'm newbie and…
anitakh
  • 9
  • 3
0
votes
2 answers

How to allow user to take picture and share it?

I am using Xcode 10, swift 5. I have a tableViewController that allows a user to tap, swipe left and right. When the swipe right it reveals a leading button that says complete. When the user taps the button a share dialog appears and allows them to…
user8540450
0
votes
2 answers

UITableViewCell - Set background as gradient to Delete (Swipeable Action) - Swift 4.2

I have customized my trailing swipe action for UITableViewCell. It has an image along with title and background color. It has been done like this : func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath:…
Mamta
  • 921
  • 1
  • 10
  • 28
0
votes
1 answer

Set properly a colored icon in UIContextualAction

I am using a TableView to list some images with descriptions. Additionally this images needs to be shared and deleted and theirfore I am using UIContextualAction. To the object I set the image for deleting like this: deleteAction.image =…