File tree 2 files changed +16
-12
lines changed
2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class ViewController: UIViewController {
51
51
initialEffectType: . fadeIn)
52
52
}
53
53
@IBAction func doneAnimatinDidTap( _ sender: UIButton ) {
54
- NativePopup . show ( image: Preset . Native . done,
54
+ NativePopup . show ( image: Preset . Feedback . done,
55
55
title: " Added to Library " ,
56
56
message: nil ,
57
57
initialEffectType: . fadeIn)
Original file line number Diff line number Diff line change @@ -13,22 +13,26 @@ public struct Preset {
13
13
public enum Feedback : String , ImageConvertible {
14
14
case
15
15
good,
16
- bad
17
-
18
- public var image : Image {
19
- return . image( UIImage ( nativePopupNamed: " feedback_ \( rawValue) " ) )
20
- }
21
- }
22
-
23
- public enum Native : ImageConvertible {
24
- case
16
+ bad,
25
17
done
26
18
27
- public var additionalMarginTop : CGFloat { return 31 }
28
- public var additionalMarginBottom : CGFloat { return 18 }
19
+ public var additionalMarginTop : CGFloat {
20
+ switch self {
21
+ case . good, . bad: return 0
22
+ case . done: return 31
23
+ }
24
+ }
25
+ public var additionalMarginBottom : CGFloat {
26
+ switch self {
27
+ case . good, . bad: return 0
28
+ case . done: return 18
29
+ }
30
+ }
29
31
30
32
public var image : Image {
31
33
switch self {
34
+ case . good, . bad:
35
+ return . image( UIImage ( nativePopupNamed: " feedback_ \( rawValue) " ) )
32
36
case . done:
33
37
return . view( AnimatableDoneView ( ) )
34
38
}
You can’t perform that action at this time.
0 commit comments