Questions tagged [uicontextualaction]

37 questions
5
votes
1 answer

UISwipeActionsConfiguration/UIContextualAction with icon AND text AND clear background

There are a couple of similar questions out there (e.g. my previous iOS10 variant), but I think there should be up an up to date answer for iOS 11, using Swift4, that doesn't use private APIs, and doesn't rely on you restricting your icon to the…
4
votes
3 answers

How to update the tableview row after swipe action?

I am using swipe actions in my tableview. I want to add and delete small icons on the row after a swipe action completed. I use an asynchronous thread to do this but, it is not giving a smooth result as I wanted. My code is given below any help will…
Ali A.
  • 101
  • 1
  • 10
4
votes
0 answers

Rotate UIContextualAction with swift

I trying to make a chat, I find the way to make the tableView looks like you are filling it from bottom to top with the line of code below: //Swipe the tableView tableView.transform = CGAffineTransform(rotationAngle:…
AnaMM
  • 307
  • 4
  • 17
4
votes
1 answer

Setting up UIContextualAction size

I would like to know if it's possible to set the UIContextualAction size (width and height). I didn't find any member in UIContextualAction that allow me to do that so I wonder if there is a walk-around to do this? action.image =…
Wael
  • 411
  • 1
  • 6
  • 19
4
votes
4 answers

UIContextualAction icon and text alignment

While testing our app we came across an interesting bug. We have some swipe actions in our table configured like so: let retryAction = UIContextualAction(style: .destructive, title: "Remove") retryAction.image = UIImage(named:…
TodayMorning
  • 201
  • 2
  • 8
4
votes
3 answers

Is there a recommended image size for UIContextualAction icons?

New in iOS 11, UIContextualAction provides a convenient way to implement swipe actions on UITableView cells, with a title and/or image icon. I haven't found any mention in the Human Interface Guidelines of the image used by UIContextualAction. Does…
Mike Mertsock
  • 11,825
  • 7
  • 42
  • 75
3
votes
5 answers

Set custom font for UITableView swipe action (UIContextualAction)

How do you set a custom font for the title in UIContextualAction? I have tried UIAppearance but without any luck... Cheers! :)
3
votes
1 answer

How to set the corner radius of a UIContextualAction?

I haven't found anything on how to do this so I am asking a question. I made a cell with three actions: A check action, an edit action, and a delete action. The only problem is that my cell has a corner radius to it and I want my actions to…
Joe
  • 69
  • 1
  • 12
3
votes
0 answers

UIContextualAction delete row issue. UIContextualAction's menu overlaps the cell

I have two UIContextualActions which should delete rows from the table after completion. I faced the following intermittent issue: If I apply this actions very fast one by one, then the first action works fine, but when I call UIContextualAction's…
Alexey Gorbel
  • 220
  • 3
  • 11
2
votes
1 answer

iOS 12 UIContextualAction image is not inferring image color

in iOS 12 UIContextualAction is not inferring the colour of the picture. While it works for iOS 13 and more. I have tried all rendering modes of the icon, but still not working. func tableView(_ tableView: UITableView,…
2
votes
1 answer

Respond to canceling of UISwipeActionsConfiguration

My view controller needs to keep track whether a UISwipeAction is currently active as editing should not be allowed during a swipe action. To achieve that I use a flag which is set back to default in the only UIContextualAction, which removes the…
nontomatic
  • 2,003
  • 2
  • 24
  • 38
2
votes
1 answer

iOS 13 UIContextualAction completion triggers unexpected keyboard dismissal

I have a UITableView with cells that have swappable UIContextualActions to delete or rename (edit) individual cell's TextFields. Since I made the switch to Swift 5 / iOS 13, triggering the rename UIContextualAction on these cells causes the keyboard…
2
votes
2 answers

UIContextualAction triggers setEditing = true, how to disable this?

I just implemented trailingSwipeActionsConfigurationForRowAt and leadingSwipeActionsConfigurationForRowAt to add swipe actions to my UITableViewCells. func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath:…
Erik Rothoff
  • 4,826
  • 9
  • 41
  • 59
2
votes
1 answer

Delphi + iOS: Error by "translating" of "UIContextualAction" interface from ObjectiveC to Delphi

i'm trying to add swap actions for UITableView in Delphi by imlement two UITableView delegate methods available from iOS 11: leadingSwipeActionsConfigurationForRowAtIndexPath trailingSwipeActionsConfigurationForRowAtIndexPath ObjectiveC: - (nullable…
vitaliy-zh
  • 185
  • 9
1
vote
1 answer

UITableView -> trailingSwipeActionsConfigurationForRowAt -> UIContextualAction.image not centered correctly for rowHeights < 50

I have a UITableView that has a different row height for the last column. Each row has UIContextualAction to "mark as favourite" and "delete", represented by image (icons). It seams that when the row height is smaller then 50, the…
HixField
  • 3,538
  • 1
  • 28
  • 54
1
2 3