Skip to content

Commit 9c7d920

Browse files
Merge commit 'c454d5f58a0fc6518aae10c7ce78a789efdb7114'
2 parents 7318cb5 + c454d5f commit 9c7d920

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

README.md

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
![image](https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/preview_10sec33fps.gif)
1212

13-
- This is a customizable designable button view/leayr.
13+
- This is a customizable designable button view/layer.
1414
- Inside the layer you can style your button, create your own subviews.
1515
- Can choose 1 of 15 button click animation styles.
1616
- You can expand the project adding new click-animation-styles.
@@ -35,7 +35,7 @@ pod 'ButtonClickStyle'
3535

3636
## Usage
3737

38-
#### С storyboard или xib
38+
#### With storyboard or xib files
3939

4040
1) Create a "view" that inherits from `ButtonClickStyleView`
4141

@@ -47,7 +47,7 @@ pod 'ButtonClickStyle'
4747
![image](https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/click_styles_example_2x_10sec33fps.gif)
4848

4949
```swift
50-
extension ButtonClick {
50+
extension ButtonClick { // animationType
5151
enum Style {
5252
case alpha
5353
case flash
@@ -72,15 +72,32 @@ extension ButtonClick {
7272

7373
5) Add animation duration `animationDuration`
7474

75-
6) Add animation value `animationTypeValue` - meaning means
76-
- "Hide .Alpha/.Flash" - will change alpha from 0.0 to 1.0
77-
- "Add .Shadow/.Color/.ColorFlat"
78-
- "Move .Pulsate/.Press/.Shake" - will increase movement decrease from 0.0 to 1.0
79-
- "TapGesture .Fave/.AndroidClickable" - will increase bubble radius
80-
- "Loading .Glare" -
75+
6) Add animation value `animationTypeValue` - meaning means for some types - alpha or power
76+
77+
- Hide
78+
.Alpha / .Flash
79+
Will change alpha for "self.view" from 0.0 to 1.0
80+
81+
- Add
82+
.Shadow / .Color / .ColorFlat
83+
Will change alpha for "add.view" from 0.0 to 1.0
84+
85+
- Move
86+
.Pulsate / .Press / .Shake
87+
Will change the strength of movement for "self.view" from 0.0 to 1.0
88+
89+
- Tap Gesture
90+
.Fave / .AndroidClickable
91+
Will increase bubble radius for "add.view"
92+
93+
- Loading
94+
.Glare
95+
No change for "add.view"
8196

8297
<!-- ![image](https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/ui3.gif) -->
8398

99+
## Init Programmatically
100+
84101
7) If initializing programmatically
85102
There is a property `addViews` - allows you to pass views / layers
86103
which you definitely want to use in the click animation only
@@ -93,14 +110,16 @@ import UIKit
93110

94111
class ViewController: UIViewController {
95112

113+
//MARK: Init Xib/Storyboards
114+
96115
@IBOutlet var xibButtonClickStyleView: ButtonClickStyleView?
97116

117+
//MARK: Init Programmaticaly
118+
98119
var prgmButtonClickStyleView: ButtonClickStyleView?
99120
var prgmFigureView: UIView!
100121
var prgmRectangleView: UIView!
101122

102-
//MARK: - Create Programmaticaly
103-
104123
override func viewDidLoad() {
105124
super.viewDidLoad()
106125

@@ -146,6 +165,10 @@ class ViewController: UIViewController {
146165

147166
![image](https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/ui3.gif)
148167

168+
## Author
169+
170+
<motionrustam@gmail.com> 📩| [mrustaa](https://github.com/mrustaa/)
171+
149172
## License
150173

151174
ButtonClickStyle is released under the MIT license.

0 commit comments

Comments
 (0)