List Deletion, Swipe Actions, Context Menus and Activity Controller
If you spend too much time thinking about a thing, you'll never get it done. Make at least one definite move daily toward your goal.
– Bruce Lee
In the earlier chapter, you learned how to handle row selection. But how about deletion? How can we delete a row from a list view? It's a common question when building a list-based app. Select, delete, insert and update are the basic operations when dealing with data. We've discussed how to select a row. Let's talk about deletion in this chapter. In addition, we'll go through a couple of new features to the FoodPin app:
- Adding a custom action button when a user swipes horizontally in a table row. This is usually known as swipe actions in SwiftUI.
- Adding a social sharing feature to the app, that enables users to easily share the restaurants.
There is a lot to learn in this chapter, but it's going to be fun and rewarding. Let's get started.
To access the full version of the book, please get the full copy here. You will also be able to access the full source code of the project.