35 | Structure
36 | Drop
37 |
38 |
39 | @available(iOSApplicationExtension, unavailable)
41 | public struct Drop: ExpressibleByStringLiteral
42 | An object representing a drop.
45 | 46 |Relationships
49 |Nested Types
88 |-
89 |
Drop.Position
90 | An enum representing drop presentation position.
91 |
92 | Drop.Duration
93 | An enum representing a drop duration on screen.
94 |
95 | Drop.Action
96 | An object representing a drop action.
97 |
98 | Drop.Accessibility
99 | An object representing accessibility options.
100 |
101 |
Conforms To
103 |-
104 |
ExpressibleByStringLiteral
105 |
Initializers
109 | 110 |
112 | init(title:titleNumberOfLines:subtitle:subtitleNumberOfLines:icon:action:position:duration:accessibility:)
113 |
114 | public init(
116 | title: String,
117 | titleNumberOfLines: Int = 1,
118 | subtitle: String? = nil,
119 | subtitleNumberOfLines: Int = 1,
120 | icon: UIImage? = nil,
121 | action: Action? = nil,
122 | position: Position = .top,
123 | duration: Duration = .recommended,
124 | accessibility: Accessibility? = nil
125 | )
126 | Create a new drop.
129 | 130 |Parameters
132 | 133 |Name | 137 |Type | 138 |Description | 139 |
---|---|---|
title | 144 |String |
145 | Title. 146 | |
147 |
titleNumberOfLines | 150 |Int |
151 | Maximum number of lines that |
153 |
subtitle | 156 |String? |
157 | Optional subtitle. Defaults to |
159 |
subtitleNumberOfLines | 162 |Int |
163 | Maximum number of lines that |
165 |
icon | 168 |UIImage? |
169 | Optional icon. 170 | |
171 |
action | 174 |Action? |
175 | Optional action. 176 | |
177 |
position | 180 |Position |
181 | Position. Defaults to |
183 |
duration | 186 |Duration |
187 | Duration. Defaults to |
189 |
accessibility | 192 |Accessibility? |
193 | Accessibility options. Defaults to |
195 |
201 | init(stringLiteral:)
202 |
203 | public init(stringLiteral title: String)
205 | Create a new accessibility object.
208 | 209 |Parameters
211 | 212 |Name | 216 |Type | 217 |Description | 218 |
---|---|---|
message | 223 |224 | | Message to be announced when the drop is shown. Defaults to drop's "title, subtitle" 225 | |
226 |
Properties
233 | 234 |
236 | title
237 |
238 | public var title: String
240 | Title.
243 | 244 |
248 | titleNumberOfLines
249 |
250 | public var titleNumberOfLines: Int
252 | Maximum number of lines that title
can occupy. Defaults to 1
. A value of 0 means no limit.
260 | subtitle
261 |
262 | public var subtitle: String?
264 | Subtitle.
267 | 268 |
272 | subtitleNumberOfLines
273 |
274 | public var subtitleNumberOfLines: Int
276 | Maximum number of lines that subtitle
can occupy. Defaults to 1
. A value of 0 means no limit.
284 | icon
285 |
286 | public var icon: UIImage?
288 | Icon.
291 | 292 |
296 | action
297 |
298 | public var action: Action?
300 | Action.
303 | 304 |
308 | position
309 |
310 | public var position: Position
312 | Position.
315 | 316 |
320 | duration
321 |
322 | public var duration: Duration
324 | Duration.
327 | 328 |
332 | accessibility
333 |
334 | public var accessibility: Accessibility
336 | Accessibility.
339 | 340 |