ActionSheetItem

public struct ActionSheetItem

ActionSheetItem is used to present an action.

Author

Adamas

Version

1.6.0

Date

24/09/2019
  • Create an action item.

    Declaration

    Swift

    public init(title: String,
                icon: UIImage? = nil,
                action: @escaping () -> Void)

    Parameters

    title

    The title.

    icon

    The icon. Nil by default.

    action

    The action.

  • Create a cancellation or destruction item.

    Declaration

    Swift

    public init(title: String, style: UIAlertAction.Style)

    Parameters

    title

    The title.

    style

    The style.

  • Create an item using a view controller. Better to keep the background of the view controller to be clear.

    Declaration

    Swift

    public init(viewController: UIViewController)

    Parameters

    viewController

    The view controller.