canPerform(withItems:)
Returns whether the service can share all the specified items.
Declaration
func canPerform(withItems items: [Any]?) -> BoolParameters
- items:
The items to share.
Return Value
true if the service can share all the items; false otherwise. If items is nil, the method will return true when the service is configured.
Discussion
This method can be used to validate a custom user interface such as a dedicated Twitter button. Therefore you could call it once at launch time with nil items to check whether to display the button or not, and then with real items to enable and disable the button depending on the context or selection.