Instance Property

allowsMultipleSelection

A Boolean value that determines whether users can select more than one row outside of editing mode.

Declaration

var allowsMultipleSelection: Bool { get set }

Discussion

This property controls whether multiple rows can be selected simultaneously outside of editing mode. When the value of this property is true, each row that is tapped acquires a selected appearance. Tapping the row again removes the selected appearance. If you access indexPathsForSelectedRows, you can get the index paths that identify the selected rows.

The default value of this property is false.

See Also

Selecting Rows

var indexPathForSelectedRow: IndexPath?

An index path identifying the row and section of the selected row.

var indexPathsForSelectedRows: [IndexPath]?

The index paths representing the selected rows.

func selectRow(at: IndexPath?, animated: Bool, scrollPosition: UITableView.ScrollPosition)

Selects a row in the table view identified by index path, optionally scrolling the row to a location in the table view.

func deselectRow(at: IndexPath, animated: Bool)

Deselects a given row identified by index path, with an option to animate the deselection.

var allowsSelection: Bool

A Boolean value that determines whether users can select a row.

var allowsSelectionDuringEditing: Bool

A Boolean value that determines whether users can select cells while the table view is in editing mode.

var allowsMultipleSelectionDuringEditing: Bool

A Boolean value that controls whether users can select more than one cell simultaneously in editing mode.

class let selectionDidChangeNotification: NSNotification.Name

Posted when the selected row in the posting table view changes.