selectAll(_:)
Selects all items in the collection view, if doing so is possible.
Declaration
@IBAction func selectAll(_ sender: Any?)Parameters
- sender:
The object that requested the action. You may specify
nilfor this property.
Discussion
This method works only when the isSelectable and allowsMultipleSelection properties are both true. If either property is set to false, this method quietly does nothing and any connected menu item is disabled.
This method consults the delegate object regarding the selection. Specifically, it calls the delegate’s collectionView(_:shouldSelectItemsAt:) method to see if the items should be selected. For any items that are selected, it calls the collectionView(_:didSelectItemsAt:) method.