File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class PopupAnimation {
11
11
12
12
public static var `default` = PopupAnimation ( . center, . spring( response: 0.4 , dampingFraction: 0.7 , blendDuration: 0.35 ) )
13
13
14
- public let position : PopupPosition
14
+ public var position : PopupPosition
15
15
16
16
public var animation : Animation
17
17
@@ -25,6 +25,20 @@ public class PopupAnimation {
25
25
26
26
}
27
27
28
+ extension PopupAnimation {
29
+ @discardableResult
30
+ public func position( _ position: PopupPosition ) -> PopupAnimation {
31
+ self . position = position
32
+ return self
33
+ }
34
+
35
+ @discardableResult
36
+ public func animation( _ animation: Animation ) -> PopupAnimation {
37
+ self . animation = animation
38
+ return self
39
+ }
40
+ }
41
+
28
42
extension Animation {
29
43
var duration : TimeInterval {
30
44
TimeInterval ( description. components ( separatedBy: " , " ) . first ( where: { $0. contains ( " duration " ) } ) ? . components ( separatedBy: " duration: " ) . last ??
You can’t perform that action at this time.
0 commit comments