|
13 | 13 | [](https://swift.org/) |
14 | 14 | [](https://github.com/mrustaa/ButtonClickStyle/LICENSE) |
15 | 15 |
|
16 | | -- This is a customizable/designable "button view", |
| 16 | +- This is a customizable/designable Button View, |
17 | 17 | - with 15 animated click styles, |
18 | 18 | - that allows you to design your own buttons from subviews, |
19 | 19 | - in storyboard and xib right away. |
@@ -45,65 +45,78 @@ pod 'ButtonClickStyle' |
45 | 45 |
|
46 | 46 | ## Usage |
47 | 47 |
|
48 | | -#### With storyboard or xib files |
| 48 | +#### With Storyboard or Xib files. Designable |
49 | 49 |
|
50 | | -1) Create a "view" that inherits from `ButtonClickStyleView` |
| 50 | +1) Create a `UIView` that inherits from `ButtonClickStyleView` |
51 | 51 |
|
52 | | -2) Inside this layer, create your own button |
| 52 | +2) Inside this View, create design your own button from subviews |
53 | 53 |
|
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` |
56 | 56 |
|
57 | 57 |  |
58 | 58 |
|
59 | 59 | ```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 |
77 | 80 | } |
78 | 81 | } |
79 | 82 | ``` |
80 | 83 |
|
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` |
82 | 85 |
|
83 | | -5) Add animation duration `animationDuration` |
| 86 | +5) Add animation duration `animDuration` |
84 | 87 |
|
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 |
86 | 89 |
|
87 | | -- Hide |
88 | | - .Alpha / .Flash |
| 90 | +- Hide |
| 91 | + .Alpha / .Flash |
89 | 92 | Will change alpha for "self.view" from 0.0 to 1.0 |
90 | | - |
| 93 | + |
91 | 94 | - Add |
92 | | - .Shadow / .Color / .ColorFlat |
| 95 | + .Shadow / .Color / .ColorFlat |
93 | 96 | Will change alpha for "add.view" from 0.0 to 1.0 |
94 | 97 |
|
95 | 98 | - Move |
96 | | - .Pulsate / .Press / .Shake |
| 99 | + .Pulsate / .Press / .Shake |
97 | 100 | Will change the strength of movement for "self.view" from 0.0 to 1.0 |
98 | 101 |
|
99 | | -- Tap Gesture |
100 | | - .Fave / .AndroidClickable |
| 102 | +- Tap Gesture |
| 103 | + .Fave / .AndroidClickable |
101 | 104 | Will increase bubble radius for "add.view" |
102 | 105 |
|
103 | 106 | - Loading |
104 | | - .Glare |
| 107 | + .Glare |
105 | 108 | No change for "add.view" |
106 | 109 |
|
| 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 | + |
107 | 120 | <!--  --> |
108 | 121 |
|
109 | 122 | ## Init Programmatically |
|
0 commit comments