You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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 inMovieDetailViewController
, and don't forget to update the lists inMovieModel
accordingly.The text was updated successfully, but these errors were encountered: