Drops Documentation

Structure Drop

@available(iOSApplicationExtension, unavailable)
public struct Drop: ExpressibleByStringLiteral  

An object representing a drop.

Drop Drop ExpressibleByStringLiteral ExpressibleByStringLiteral Drop->ExpressibleByStringLiteral

Nested Types

Drop.Position

An enum representing drop presentation position.

Drop.Duration

An enum representing a drop duration on screen.

Drop.Action

An object representing a drop action.

Drop.Accessibility

An object representing accessibility options.

Conforms To

ExpressibleByStringLiteral

Initializers

init(title:​title​Number​OfLines:​subtitle:​subtitle​Number​OfLines:​icon:​action:​position:​duration:​accessibility:​)

public init(
        title: String,
        titleNumberOfLines: Int = 1,
        subtitle: String? = nil,
        subtitleNumberOfLines: Int = 1,
        icon: UIImage? = nil,
        action: Action? = nil,
        position: Position = .top,
        duration: Duration = .recommended,
        accessibility: Accessibility? = nil
    )  

Create a new drop.

Parameters

title String

Title.

title​Number​OfLines Int

Maximum number of lines that title can occupy. Defaults to 1. A value of 0 means no limit.

subtitle String?

Optional subtitle. Defaults to nil.

subtitle​Number​OfLines Int

Maximum number of lines that subtitle can occupy. Defaults to 1. A value of 0 means no limit.

icon UIImage?

Optional icon.

action Action?

Optional action.

position Position

Position. Defaults to Drop.Position.top.

duration Duration

Duration. Defaults to Drop.Duration.recommended.

accessibility Accessibility?

Accessibility options. Defaults to nil which will use "title, subtitle" as its message.

init(string​Literal:​)

public init(stringLiteral title: String)  

Create a new accessibility object.

Parameters

message

Message to be announced when the drop is shown. Defaults to drop's "title, subtitle"

Properties

title

public var title: String

Title.

title​Number​OfLines

public var titleNumberOfLines: Int

Maximum number of lines that title can occupy. Defaults to 1. A value of 0 means no limit.

subtitle

public var subtitle: String? 

Subtitle.

subtitle​Number​OfLines

public var subtitleNumberOfLines: Int

Maximum number of lines that subtitle can occupy. Defaults to 1. A value of 0 means no limit.

icon

public var icon: UIImage? 

Icon.

action

public var action: Action? 

Action.

position

public var position: Position

Position.

duration

public var duration: Duration

Duration.

accessibility

public var accessibility: Accessibility

Accessibility.