Contents

widgetListPerformAddAction(_:)

Asks the delegate to perform an action when the Add (+) button is clicked.

Declaration

optional func widgetListPerformAddAction(_ list: NCWidgetListViewController)

Parameters

  • list:

    The widget’s list view controller.

Discussion

When a widget’s list is in editing mode, the list view controller can display an Add (+) button. The button’s action calls widgetListPerformAddAction: in the delegate.

If you want to display the default search view in the add action, you can use the presentViewControllerInWidget: method of NSViewController to present an NCWidgetSearchViewController instance in the widget’s principal view controller.

See Also

Adding and Deleting Rows