22
33![ image] ( https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/all_ipad_random.gif )
44
5- This is a layer button
5+ This is a view button
6+
67Has 9 styles of animated click
78
89Inside the layer you can style your button, create your own subviews
910
10- + You can expand the project
11- adding new click-animation-styles
11+ You can expand the project adding new click-animation-styles
1212
1313## Requirements
1414
15- macOS 10.12+
16- Xcode 13+
17- Swift 5.5+
15+ - macOS 10.12+
16+ - Xcode 13+
17+ - Swift 5.5+
1818
1919## Installation
2020
@@ -31,31 +31,36 @@ Swift 5.5+
3131``` swift
3232#type #name
3333
34- hide .alpha
35- hide .flash
36- add .shadow
37- add .shadow color
38- add .color
39- add .color flat (border text)
40- move .pulsate new
41- move .pulsate
42- move .press
43- move .shake new
44- move .shake
45- add .androidClickable dark
46- add .androidClickable ligt
34+ enum Style {
35+ # hide
36+ case alpha
37+ case flash // alpha flicker
38+ # add
39+ case shadow
40+ case shadowColor
41+ case color
42+ case colorFlat // border text
43+ # move
44+ case pulsateNew
45+ case pulsate
46+ case press
47+ case shakeNew
48+ case shake
49+ # add pulsate
50+ case androidClickableDark
51+ case androidClickableLigt
52+ }
4753```
4854
49- 4 ) Так же вы можете выбрать анимировать все слои ` allSubviews ` / или только 1
55+ 4 ) Also you can select specific layers to animate / or just 1 specific one ` allSubviews `
5056
5157
52- 5 ) Добавить + animation.Duration - время анимации
58+ 5 ) Add animation duration ` animationDuration `
5359
54- 6 ) Добавить + animation.Value - под значением имеется ввиду
55- у анимации тип
56- - "Hide .Alpha/Flash/Shadow/Color" будет меняться альфа от 0.0 до 1.0
57- - "Move .Pulsate/Press/Shake" будет движения усиливаться уменьшаться от 0.0 до 1.0
58- - "Add .AndroidClickable" будет увелмчиваться радиус пузырей
60+ 6 ) Add animation value ` animationTypeValue ` - meaning means
61+ - "Hide .Alpha/Flash/Shadow/Color" - will change alpha from 0.0 to 1.0
62+ - "Move .Pulsate/Press/Shake" - will increase movement decrease from 0.0 to 1.0
63+ - "Add .AndroidClickable" - will increase bubble radius
5964
6065
6166``` swift
@@ -65,11 +70,11 @@ add .androidClickable ligt
6570@IBInspectable var animationDuration: CGFloat = 0.0
6671
6772var addViews: [UIView]?
68-
6973```
70- 7 ) Если иниализацируйие программно
71- - Есть свойство ` addViews ` - позволяет передать вьшки/слои
72- которые вы точно захотите задейстовать в анимации нажатия only
74+
75+ 7 ) If initializing programmatically
76+ - There is a property ` addViews ` - allows you to pass views / layers
77+ which you definitely want to use in the click animation only
7378
7479
7580``` swift
@@ -84,8 +89,6 @@ btnView.updateSubviews()
8489
8590```
8691
87-
88-
8992## Credits
9093
9194
0 commit comments