<!--
{
  "availability" : [
    "macOS: 10.10.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "NotificationCenter",
  "identifier" : "/documentation/NotificationCenter/NCWidgetListViewDelegate/widgetList(_:shouldRemoveRow:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Notification Center"
    ],
    "preciseIdentifier" : "c:objc(pl)NCWidgetListViewDelegate(im)widgetList:shouldRemoveRow:"
  },
  "title" : "widgetList(_:shouldRemoveRow:)"
}
-->

# widgetList(_:shouldRemoveRow:)

Asks the delegate to allow or prohibit the specified row to be removed from the list.

```
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

<doc://com.apple.documentation/documentation/Swift/true> if the specified row can be removed, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

List item deletion is not enabled unless the delegate implements this method and [`widgetList(_:didRemoveRow:)`](/documentation/NotificationCenter/NCWidgetListViewDelegate/widgetList(_:didRemoveRow:)). Returning <doc://com.apple.documentation/documentation/Swift/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`](/documentation/NotificationCenter/NCWidgetListViewController/contents) array.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)