iOS Developer Library

Developer

UIKit Framework Reference UIPreviewActionItem Protocol Reference

Options
Deployment Target:

On This Page
Language:

UIPreviewActionItem

The UIPreviewActionItem protocol is adopted by the UIPreviewAction and UIPreviewActionGroup classes.

This protocol defines the styles you can apply to peek quick actions and peek quick action groups, and defines a read-only accessor for the user-visible title of a peek quick action.

  • title title Required Property

    The peek quick action item’s title. (read-only)

    Declaration

    Swift

    var title: String { get }

    Objective-C

    @property(nonatomic, copy, readonly) NSString *title

    Discussion

    The system displays the title as an option within a quick action sheet, below a peek and visible when the user swipes upward on the peek.

    Availability

    Available in iOS 9.0 and later.

  • The style for a peek quick action. Use these styles with instances of the UIPreviewAction and UIPreviewActionGroup classes.

    Declaration

    Swift

    enum UIPreviewActionStyle : Int { case Default case Selected case Destructive }

    Objective-C

    enum UIPreviewActionStyle : NSInteger { UIPreviewActionStyleDefault = 0, UIPreviewActionStyleSelected, UIPreviewActionStyleDestructive, }; typedef enum UIPreviewActionStyle UIPreviewActionStyle;

    Constants

    • default

      UIPreviewActionStyleDefault

      The default style.

      Available in iOS 9.0 and later.

    • selected

      UIPreviewActionStyleSelected

      The style for a selected peek quick action. Use this style for the initially-selected item within a disclosed peek quick action group.

      Available in iOS 9.0 and later.

    • destructive

      UIPreviewActionStyleDestructive

      The style for a peek quick action that changes or deletes data.

      Available in iOS 9.0 and later.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 9.0 and later.