Questions tagged [uiswipeactionsconfiguration]
33 questions
11
votes
2 answers
Dismiss UISwipeActionsConfiguration by swiping back
I implemented trailing swipe actions using new iOS 11 UISwipeActionsConfiguration API, and I can reveal them by swiping from the edge, can swipe all the way to the left side etc.
But I can't hide those actions by swiping back to original position.…

Oleksii Nezhyborets
- 911
- 11
- 23
5
votes
2 answers
Why is the leading swipe action also duplicated as a trailing action?
I have implemented a leading swipe action ('Delete') on my tableView which for a reason I can't figure out is also appearing as a trailing swipe action. See code below:
func tableView(_ tableView: UITableView,…

Zenman C
- 1,653
- 13
- 21
5
votes
4 answers
Image in trailingSwipeActionsConfigurationForRowAt doesn't seem to work
I'm trying to implement a new iOS11 feature that allows you to officially use an image in a tableview swipe action.
so, I came up with this:
@available(iOS 11.0, *)
func tableView(_ tableView: UITableView,…

Sjakelien
- 2,255
- 3
- 25
- 43
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…

Travis Griggs
- 21,522
- 19
- 91
- 167
4
votes
1 answer
UITableView Swipe Action is not working when user begin swiping on the UIImageView
I have implemented UITableView with left swipe actions for each TableViewCell. For implementing left swipe action, I used following delegate method which is provided by the apple.
-(NSArray *)tableView:(UITableView *)tableView…

Tharindu Ketipearachchi
- 1,046
- 1
- 9
- 26
4
votes
2 answers
Trailing swipe actions not dismissing
I have trailing swipe actions configured in my UITableView. The actions work correctly, but when an action removes the cell from the table, the swipe actions remain over the row that replaces the removed row. So it looks like the new current row is…

Jonathan Tuzman
- 11,568
- 18
- 69
- 129
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! :)

Jens Schwarzer
- 2,840
- 1
- 22
- 35
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
UITableView, UISwipeActionsConfiguration, UIContextualAction - The pullView is not in a view hierarchy. This is a UIKit bug
I have a UITableView with swipe action that when swiping: A) displays a blank/empty area where the swipe action button should display; and B) the following line is logged to the debug console in Xcode:
[Assert] The pullView is not in a view…

jims1103
- 733
- 5
- 8
2
votes
1 answer
How to dismiss swipe action context menu on cancel
I've added a swipe to delete functionality with the use of
override func tableView(_ tableView: UITableView,
trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath)
-> UISwipeActionsConfiguration?
I'm calling an alert…

Lukasz 'Severiaan' Grela
- 6,078
- 7
- 43
- 79
2
votes
0 answers
.withRenderingMode(.alwaysOriginal) doesn't work for image in UITableView trailingSwipeActionsConfigurationForRowAt action
I want to create action in .trailingSwipeActionsConfigurationForRowAt with image in original image's colors. By default all image turns white. In my image there is few colors and I want to keep them all, so I can't just tint it. I'm trying to use…

Lee B
- 61
- 6
2
votes
3 answers
Image in TableViewCell swipe action
I have a swipe action to 'complete' a task in my to-do list app. This is the image I have set:
However when the cell is swiped, the image looks like this:
Is there a way to make the background transparent/white and the image to have the green…

Will Taylor
- 511
- 1
- 6
- 14
1
vote
1 answer
Changing tint color of system image in trailing swipe action
I'm trying to change color of trash system image but it doesn't work for some reason.
func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
let deleteAction =…

TayaR
- 31
- 4
1
vote
0 answers
Keyboard Won't Stay Up on Textfield When Called From Swipe Action (Swift/Xcode)
I have a tableview, and the cells have a textfield in them. I'd like to make this textfield uneditable unless the user taps a swipe action. In that case, I'd like the keyboard to come up automatically on the textfield in the cell they want to…

G26Bandit
- 69
- 1
- 9
1
vote
2 answers
How do I disable the default Delete swipe action and display my custom swipe action instead?
I'm implementing leading/trailing swipe actions in my app.
The leading swipe action is to join/leave an event in the table. The trailing swipe action is to delete an event. Both of these swipe actions should be conditional, based primarily on if the…

Zonker.in.Geneva
- 1,389
- 11
- 19