Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Swipe to delete" functionality on watchlist/favorites list #11

Open
OwenLaRosa opened this issue Nov 9, 2018 · 0 comments
Open

"Swipe to delete" functionality on watchlist/favorites list #11

OwenLaRosa opened this issue Nov 9, 2018 · 0 comments
Labels
moviemanagerchallenge Task for "Improve the Movie Manager" Challenge

Comments

@OwenLaRosa
Copy link
Contributor

Many apps using tables will allow you to manage the list directly from the table view. As a simple new feature, we can do this for the watchlist and favorites list.

To get the "swipe to "delete" functionality, you'll want to implement some methods on your watchlist or favorites view controllers.

tableView(_:canEditRowAt:):
https://developer.apple.com/documentation/uikit/uitableviewdatasource/1614900-tableview
tableView(_:commit:forRowAt:):
https://developer.apple.com/documentation/uikit/uitableviewdatasource/1614871-tableview

In tableView(_:commit:forRowAt:), once you know the movie that's been deleted, you can simply remove it from the watchlist/favorites list using the same methods you used in MovieDetailViewController, and don't forget to update the lists in MovieModel accordingly.

@OwenLaRosa OwenLaRosa added the moviemanagerchallenge Task for "Improve the Movie Manager" Challenge label Nov 9, 2018
BrentMifsud pushed a commit to BrentMifsud/TheMovieManager that referenced this issue Jun 2, 2019
BrentMifsud pushed a commit to BrentMifsud/TheMovieManager that referenced this issue Jun 2, 2019
BrentMifsud pushed a commit to BrentMifsud/TheMovieManager that referenced this issue Jun 2, 2019
BrentMifsud pushed a commit to BrentMifsud/TheMovieManager that referenced this issue Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moviemanagerchallenge Task for "Improve the Movie Manager" Challenge
Projects
None yet
Development

No branches or pull requests

1 participant