UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

UITableViewDiffableDataSource didSelectRowAt and how to customise

Forums > Swift

Hey guys. I have created a UITableView with the DiffableDataSource. By enabling didSelectRowAt, you can interact with the cell by swiping left. So I have two questions. When cell swiped, you can't see it. At first I just tought that intercation doesn't happen. Now I ve realised that its just invisible. How can I activate some animation, eventually put some text to inform the user what he does with that cell.

Second question is, can I actually change that interaction for cell to be clicked, not swiped? Many thanks for help.

2      

I am not sure what you want to achieve. With the didSelectRowAt method this will get called when user taps on a cell. You can then get the item from your Diffable datasource by calling itemIdentifier(for: indexPath)

2      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.