1010
1111![ image] ( https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/preview_10sec33fps.gif )
1212
13- - This is a customizable designable button view.
13+ - This is a customizable designable button view/leayr .
1414- Inside the layer you can style your button, create your own subviews.
15- - Can choose 1 of 9 button click animation styles.
15+ - Can choose 1 of 15 button click animation styles.
1616- You can expand the project adding new click-animation-styles.
1717
1818## Requirements
@@ -63,6 +63,8 @@ extension ButtonClick {
6363 case shakeNew
6464 case androidClickable
6565 case androidClickableDark
66+ case fave
67+ case glare
6668 }
6769}
6870```
@@ -93,6 +95,23 @@ var addViews: [UIView]?
9395There is a property ` addViews ` - allows you to pass views / layers
9496which you definitely want to use in the click animation only
9597
98+ ``` swift
99+ @IBOutlet var mainView: UIView!
100+
101+ var views: [UIView]? = [mainView]
102+ let frame: CGRect = .init (x : 23 , y : 22 , width : 156 , height : 48 )
103+ let viewAn = ButtonClickStyleView (
104+ state : state,
105+ frame : frame,
106+ radius : 20 ,
107+ addViews : views
108+ )
109+ btnView.insertSubview (mainView, at : 0 )
110+ btnView.updateSubviews ()
111+
112+ ```
113+
114+
961158 ) Or initialize through a struct ` ButtonClick.State `
97116
98117``` swift
@@ -105,29 +124,15 @@ extension ButtonClick {
105124 var animationDuration: CGFloat?
106125 var new: Bool = false
107126 var color: UIColor?
108- var startClick: Bool = false
127+ var startClick: Bool = false
128+ var debugButtonShow: Bool = false
109129 var addBackgrondColor: Bool = true
110130 }
111131}
112132```
113133
114134![ image] ( https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/ui3.gif )
115135
116- ``` swift
117- @IBOutlet var mainView: UIView!
118-
119- var views: [UIView]? = [mainView]
120- let frame: CGRect = .init (x : 23 , y : 22 , width : 156 , height : 48 )
121- let viewAn = ButtonClickStyleView (
122- state : state,
123- frame : frame,
124- radius : 20 ,
125- addViews : views
126- )
127- btnView.insertSubview (mainView, at : 0 )
128- btnView.updateSubviews ()
129-
130- ```
131136
132137## License
133138
0 commit comments