widgetList(_:shouldRemoveRow:)
Asks the delegate to allow or prohibit the specified row to be removed from the list.
Declaration
optional func widgetList(_ list: NCWidgetListViewController, shouldRemoveRow row: Int) -> BoolParameters
- list:
The widget’s list view controller.
- row:
The row that should be removed.
Return Value
Discussion
List item deletion is not enabled unless the delegate implements this method and widgetList(_:didRemoveRow:). Returning false prohibits row from being deleted. Returning YES allows row to be deleted, and the delegate will be called again when the item that row represents is deleted from the list view controller’s contents array.