File tree 11 files changed +244
-5
lines changed
11 files changed +244
-5
lines changed Original file line number Diff line number Diff line change 41
41
# # Carthage
42
42
Carthage /Build
43
43
44
- # # Jazzy docs
45
- docs /
46
-
47
44
# # Fastlane
48
45
fastlane /report.xml
49
46
fastlane /Preview.html
Original file line number Diff line number Diff line change
1
+ # Drop
2
+
3
+ An object representing a drop.
4
+
5
+ ``` swift
6
+ public struct Drop
7
+ ```
8
+
9
+ ## Initializers
10
+
11
+ ### `init(title:subtitle :icon :action :style :duration :)`
12
+
13
+ Create a new drop.
14
+
15
+ ``` swift
16
+ public init(
17
+ title: String ,
18
+ subtitle : String ? = nil,
19
+ icon: UIImage ? = nil,
20
+ action: Action ? = nil,
21
+ style: Style = .top,
22
+ duration: Duration = .recommended
23
+ )
24
+ ```
25
+
26
+ #### Parameters
27
+
28
+ - title: Title .
29
+ - subtitle: Optional subtitle . Defaults to `nil` .
30
+ - icon: Optional icon .
31
+ - action: Optional action .
32
+ - style: Style . Defaults to `Drop .Style .top` .
33
+ - duration: Duration . Defaults to `Drop .Duration .recommended` .
34
+
35
+ ## Properties
36
+
37
+ ### `title`
38
+
39
+ Title.
40
+
41
+ ``` swift
42
+ public var title: String
43
+ ```
44
+
45
+ ### `subtitle`
46
+
47
+ Subtitle.
48
+
49
+ ``` swift
50
+ public var subtitle: String ?
51
+ ```
52
+
53
+ ### `icon`
54
+
55
+ Icon.
56
+
57
+ ``` swift
58
+ public var icon: UIImage ?
59
+ ```
60
+
61
+ ### `action`
62
+
63
+ Action.
64
+
65
+ ``` swift
66
+ public var action: Action ?
67
+ ```
68
+
69
+ ### `style`
70
+
71
+ Style.
72
+
73
+ ``` swift
74
+ public var style: Style
75
+ ```
76
+
77
+ ### `duration`
78
+
79
+ Duration.
80
+
81
+ ``` swift
82
+ public var duration: Duration
83
+ ```
Original file line number Diff line number Diff line change
1
+ # Drop.Action
2
+
3
+ An object representing a drop action.
4
+
5
+ ``` swift
6
+ public struct Action
7
+ ```
8
+
9
+ ## Initializers
10
+
11
+ ### `init(icon:handler :)`
12
+
13
+ Create a new action.
14
+
15
+ ``` swift
16
+ public init(icon: UIImage ? = nil, handler: @escaping () -> Void )
17
+ ```
18
+
19
+ #### Parameters
20
+
21
+ - icon: Optional icon image .
22
+ - handler: Handler to be called when the drop is tapped .
23
+
24
+ ## Properties
25
+
26
+ ### `icon`
27
+
28
+ Icon.
29
+
30
+ ``` swift
31
+ public var icon: UIImage ?
32
+ ```
33
+
34
+ ### `handler`
35
+
36
+ Handler.
37
+
38
+ ``` swift
39
+ public var handler: () -> Void
40
+ ```
Original file line number Diff line number Diff line change
1
+ # Drop.Duration
2
+
3
+ An enum representing a drop duration on screen.
4
+
5
+ ``` swift
6
+ public enum Duration
7
+ ```
8
+
9
+ ## Enumeration Cases
10
+
11
+ ### `recommended`
12
+
13
+ Hides the drop after 2.0 seconds.
14
+
15
+ ``` swift
16
+ case recommended
17
+ ```
18
+
19
+ ### `seconds`
20
+
21
+ Hides the drop after the specified number of seconds.
22
+
23
+ ``` swift
24
+ case seconds(TimeInterval)
25
+ ```
Original file line number Diff line number Diff line change
1
+ # Drop.Style
2
+
3
+ An enum representing drop presentation style.
4
+
5
+ ``` swift
6
+ public enum Style
7
+ ```
8
+
9
+ ## Enumeration Cases
10
+
11
+ ### `top`
12
+
13
+ Drop is presented from top.
14
+
15
+ ``` swift
16
+ case top
17
+ ```
18
+
19
+ ### `bottom`
20
+
21
+ Drop is presented from bottom.
22
+
23
+ ``` swift
24
+ case bottom
25
+ ```
Original file line number Diff line number Diff line change
1
+ # Drops
2
+
3
+ Drops.
4
+
5
+ ``` swift
6
+ public final class Drops
7
+ ```
8
+
9
+ ## Inheritance
10
+
11
+ [`AnimatorDelegate`](/AnimatorDelegate)
12
+
13
+ ## Methods
14
+
15
+ ### `show(_:)`
16
+
17
+ Show a drop.
18
+
19
+ ``` swift
20
+ static func show(_ drop: Drop )
21
+ ```
22
+
23
+ #### Parameters
24
+
25
+ - drop: `Drop` to show .
26
+
27
+ ### `hideAll()`
28
+
29
+ Hide all drops.
30
+
31
+ ``` swift
32
+ static func hideAll()
33
+ ```
34
+
35
+ ### `hideCurrent()`
36
+
37
+ Hide currently shown drop.
38
+
39
+ ``` swift
40
+ static func hideCurrent()
41
+ ```
Original file line number Diff line number Diff line change
1
+ # Types
2
+
3
+ - [ Drops] ( /Drops ) :
4
+ Drops.
5
+ - [ Drop.Style] ( /Drop_Style ) :
6
+ An enum representing drop presentation style.
7
+ - [ Drop.Duration] ( /Drop_Duration ) :
8
+ An enum representing a drop duration on screen.
9
+ - [ Drop] ( /Drop ) :
10
+ An object representing a drop.
11
+ - [ Drop.Action] ( /Drop_Action ) :
12
+ An object representing a drop action.
Original file line number Diff line number Diff line change
1
+ Generated at 2021-05-05T04:34:09+0200 using [ swift-doc] ( https://github.com/SwiftDocOrg/swift-doc ) 1.0.0-beta.6.
Original file line number Diff line number Diff line change
1
+ <details >
2
+ <summary >Types</summary >
3
+
4
+ - [ Drop] ( /Drop )
5
+ - [ Drop.Action] ( /Drop.Action )
6
+ - [ Drop.Duration] ( /Drop.Duration )
7
+ - [ Drop.Style] ( /Drop.Style )
8
+ - [ Drops] ( /Drops )
9
+
10
+ </details >
Original file line number Diff line number Diff line change 535
535
"@executable_path/Frameworks",
536
536
"@loader_path/Frameworks",
537
537
);
538
- MARKETING_VERSION = 0.2 .0;
538
+ MARKETING_VERSION = 0.3 .0;
539
539
PRODUCT_BUNDLE_IDENTIFIER = com.omaralbeik.drops;
540
540
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
541
541
SKIP_INSTALL = YES;
564
564
"@executable_path/Frameworks",
565
565
"@loader_path/Frameworks",
566
566
);
567
- MARKETING_VERSION = 0.2 .0;
567
+ MARKETING_VERSION = 0.3 .0;
568
568
PRODUCT_BUNDLE_IDENTIFIER = com.omaralbeik.drops;
569
569
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
570
570
SKIP_INSTALL = YES;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ typealias AnimationCompletion = (_ completed: Bool) -> Void
27
27
28
28
private let sharedInstance = Drops ( )
29
29
30
+ /// Drops.
30
31
public final class Drops {
31
32
private func show( drop: Drop ) {
32
33
let presenter = Presenter ( drop: drop, delegate: self )
@@ -140,14 +141,18 @@ extension Drops: AnimatorDelegate {
140
141
}
141
142
142
143
public extension Drops {
144
+ /// Show a drop.
145
+ /// - Parameter drop: `Drop` to show.
143
146
static func show( _ drop: Drop ) {
144
147
sharedInstance. show ( drop: drop)
145
148
}
146
149
150
+ /// Hide all drops.
147
151
static func hideAll( ) {
148
152
sharedInstance. hideAll ( )
149
153
}
150
154
155
+ /// Hide currently shown drop.
151
156
static func hideCurrent( ) {
152
157
sharedInstance. hideCurrent ( )
153
158
}
You can’t perform that action at this time.
0 commit comments