Skip to content

Commit 660a1d4

Browse files
Update README.md
1 parent 679d19e commit 660a1d4

1 file changed

Lines changed: 47 additions & 34 deletions

File tree

README.md

Lines changed: 47 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[![Swift 5.2](https://img.shields.io/badge/Swift-5.5-orange.svg?style=flat)](https://swift.org/)
1414
[![License](https://img.shields.io/github/license/almazrafi/Fugen.svg)](https://github.com/mrustaa/ButtonClickStyle/LICENSE)
1515

16-
- This is a customizable/designable "button view",
16+
- This is a customizable/designable Button View,
1717
- with 15 animated click styles,
1818
- that allows you to design your own buttons from subviews,
1919
- in storyboard and xib right away.
@@ -45,65 +45,78 @@ pod 'ButtonClickStyle'
4545

4646
## Usage
4747

48-
#### With storyboard or xib files
48+
#### With Storyboard or Xib files. Designable
4949

50-
1) Create a "view" that inherits from `ButtonClickStyleView`
50+
1) Create a `UIView` that inherits from `ButtonClickStyleView`
5151

52-
2) Inside this layer, create your own button
52+
2) Inside this View, create design your own button from subviews
5353

54-
3) In Attributes Inspector of Interface Builder
55-
you can immediately select the button click style `animationType`
54+
3) In Attributes Inspector of Interface Builder,
55+
you can immediately select the button click style `animType`
5656

5757
![image](https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/click_styles_example_2x_10sec33fps.gif)
5858

5959
```swift
60-
extension ButtonClick { // animationType
61-
enum Style {
62-
case alpha
63-
case flash
64-
case shadow
65-
case shadowColor
66-
case color
67-
case colorFlat
68-
case pulsateNew
69-
case pulsate
70-
case press
71-
case shake
72-
case shakeNew
73-
case androidClickable
74-
case androidClickableDark
75-
case fave
76-
case glare
60+
extension ButtonClick {
61+
// Number Value
62+
// ButtonClickStyleView `animType`
63+
// ButtonClick.State `animationType`
64+
enum Style {
65+
case alpha // 0
66+
case flash // 1
67+
case shadow // 2
68+
case shadowColor // 3
69+
case color // 4
70+
case colorFlat // 5
71+
case pulsateNew // 6
72+
case pulsate // 7
73+
case press // 8
74+
case shake // 9
75+
case shakeNew // 10
76+
case androidClickable // 11
77+
case androidClickableDark // 12
78+
case fave // 13
79+
case glare // 14
7780
}
7881
}
7982
```
8083

81-
4) Also you can select specific layers to animate / or just 1 specific one `allSubviews`
84+
4) Also you can select specific subviews to animate / or just 1 specific one-view `allSubviews`
8285

83-
5) Add animation duration `animationDuration`
86+
5) Add animation duration `animDuration`
8487

85-
6) Add animation value `animationTypeValue` - meaning means for some types - alpha or power
88+
6) Add animation value `animValue` - meaning means for some types - alpha or power
8689

87-
- Hide
88-
.Alpha / .Flash
90+
- Hide
91+
.Alpha / .Flash
8992
Will change alpha for "self.view" from 0.0 to 1.0
90-
93+
9194
- Add
92-
.Shadow / .Color / .ColorFlat
95+
.Shadow / .Color / .ColorFlat
9396
Will change alpha for "add.view" from 0.0 to 1.0
9497

9598
- Move
96-
.Pulsate / .Press / .Shake
99+
.Pulsate / .Press / .Shake
97100
Will change the strength of movement for "self.view" from 0.0 to 1.0
98101

99-
- Tap Gesture
100-
.Fave / .AndroidClickable
102+
- Tap Gesture
103+
.Fave / .AndroidClickable
101104
Will increase bubble radius for "add.view"
102105

103106
- Loading
104-
.Glare
107+
.Glare
105108
No change for "add.view"
106109

110+
6) Also you can use in special custom Designable `ButtonClickStyleDesignView` or `ButtonClickStyleDesignLabel`
111+
with bunch of options, adding
112+
+ cornerRadius
113+
+ figure type
114+
+ gradient
115+
+ shadows
116+
+ borders
117+
+ blur
118+
+ etc
119+
107120
<!-- ![image](https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/ui3.gif) -->
108121

109122
## Init Programmatically

0 commit comments

Comments
 (0)