Structure
Drop
@available(iOSApplicationExtension, unavailable)
public struct Drop: ExpressibleByStringLiteral
An object representing a drop.
Relationships
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:titleNumberOfLines:subtitle:subtitleNumberOfLines: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
Name | Type | Description |
---|---|---|
title | String |
Title. |
titleNumberOfLines | Int |
Maximum number of lines that |
subtitle | String? |
Optional subtitle. Defaults to |
subtitleNumberOfLines | Int |
Maximum number of lines that |
icon | UIImage? |
Optional icon. |
action | Action? |
Optional action. |
position | Position |
Position. Defaults to |
duration | Duration |
Duration. Defaults to |
accessibility | Accessibility? |
Accessibility options. Defaults to |
init(stringLiteral:)
public init(stringLiteral title: String)
Create a new accessibility object.
Parameters
Name | Type | Description |
---|---|---|
message | Message to be announced when the drop is shown. Defaults to drop's "title, subtitle" |
Properties
titleNumberOfLines
public var titleNumberOfLines: Int
Maximum number of lines that title
can occupy. Defaults to 1
. A value of 0 means no limit.
subtitleNumberOfLines
public var subtitleNumberOfLines: Int
Maximum number of lines that subtitle
can occupy. Defaults to 1
. A value of 0 means no limit.