Contents

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) -> Bool

Parameters

  • list:

    The widget’s list view controller.

  • row:

    The row that should be removed.

Return Value

true if the specified row can be removed, otherwise false.

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.

See Also

Adding and Deleting Rows