This requires Core Data for WishListItem class (declared in WishListTableViewController) as described in #3.
Affected function:
func wishAction(action sheet: WishAction) -> (action: UITableViewRowAction, indexPath: NSIndexPath) -> Void {
return { [unowned self] (action, indexPath) in
/// ...
switch sheet {
case .Insert:
// Insert this item to the main library
controller.addActions(self.defaultAlertActions(.Destructive) { _ in
/// Handle this case
})
case .Delete:
// Delete this item from the wish list
controller.addActions(self.defaultAlertActions(.Default) { [unowned self] _ in
/// Handle this case
})
}
/// ...
}
}
This requires Core Data for WishListItem class (declared in WishListTableViewController) as described in #3. Affected function: