Contents

UIButtonPointerStyleProvider

A type alias defining a block that returns a pointer style to apply to a button.

Declaration

typealias UIButtonPointerStyleProvider = (UIButton, __UIPointerEffect, __UIPointerShape) -> UIPointerStyle?

Parameters

  • button:

    The button requesting the pointer style.

  • proposedEffect:

    The content effect that the system suggests.

  • proposedShape:

    The shape of the pointer that the system suggests.

Return Value

The pointer style to apply to the button when the pointer hovers over it. Return nil when you don’t want to apply a pointer style to the button.

Discussion

To change the appearance of the pointer when it hovers over the button, create a pointer style provider block and assign it to the button’s pointerStyleProvider property.

See Also

Supporting pointer interactions