Skip to content

Commit 9a373a6

Browse files
Update README.md
1 parent 660a1d4 commit 9a373a6

1 file changed

Lines changed: 41 additions & 8 deletions

File tree

README.md

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,27 @@
2626

2727
[![ Xcode Create Storyboard/Xib](https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/XcodeCreateXib40.png)](https://youtu.be/VNupvYMYPmk)
2828

29+
30+
- [Requirements](#requirements)
31+
- [Installation](#installation)
32+
- [CocoaPods](#cocoapods)
33+
- [Swift Package Manager with Xcode 11](#swift-package-manager-with-xcode-13)
34+
- [Getting Started](#getting-started)
35+
- [Usage `ButtonClickStyleView`](#usage-buttonclickstyleview)
36+
- [Designable Attributes storyboard/xib files](#designable-attributes-storyboardxib-files)
37+
- [Init Programmatically](#init-programmatically)
38+
- [Addition `ButtonClickStyleDesignView`](#addition-buttonclickstyledesignview)
39+
- [Author](#author)
40+
- [License](#license)
41+
42+
2943
## Requirements
3044

3145
- Xcode 13+
3246
- iOS 9.0+
3347
- Swift 5.5+
3448

49+
3550
## Installation
3651

3752
### CocoaPods
@@ -42,10 +57,17 @@ it, simply add the following line to your Podfile:
4257
```ruby
4358
pod 'ButtonClickStyle'
4459
```
60+
### Swift Package Manager with Xcode 13
61+
62+
Follow [this doc](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app).
4563

46-
## Usage
4764

48-
#### With Storyboard or Xib files. Designable
65+
66+
## Getting Started
67+
68+
### Usage `ButtonClickStyleView`
69+
70+
#### Designable Attributes storyboard/xib files
4971

5072
1) Create a `UIView` that inherits from `ButtonClickStyleView`
5173

@@ -54,13 +76,14 @@ pod 'ButtonClickStyle'
5476
3) In Attributes Inspector of Interface Builder,
5577
you can immediately select the button click style `animType`
5678

79+
- IBDesignable ...... | `animType` ........ | Number Value | Init Interface Builder
80+
- ButtonClick.State | `animationType` | Number Value | Init Programmatiсaly State
81+
5782
![image](https://github.com/mrustaa/GifPresentations/blob/master/ButtonClickStyle/click_styles_example_2x_10sec33fps.gif)
5883

5984
```swift
6085
extension ButtonClick {
6186
// Number Value
62-
// ButtonClickStyleView `animType`
63-
// ButtonClick.State `animationType`
6487
enum Style {
6588
case alpha // 0
6689
case flash // 1
@@ -107,7 +130,11 @@ extension ButtonClick {
107130
.Glare
108131
No change for "add.view"
109132

110-
6) Also you can use in special custom Designable `ButtonClickStyleDesignView` or `ButtonClickStyleDesignLabel`
133+
134+
135+
#### Addition `ButtonClickStyleDesignView`
136+
137+
Also you can use in special custom Designable `ButtonClickStyleDesignView` or `ButtonClickStyleDesignLabel`
111138
with bunch of options, adding
112139
+ cornerRadius
113140
+ figure type
@@ -119,13 +146,19 @@ extension ButtonClick {
119146

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

122-
## Init Programmatically
123149

124-
7) If initializing programmatically
150+
151+
### Init Programmatically
152+
153+
If initializing programmatically
125154
There is a property `addViews` - allows you to pass views / layers
126155
which you definitely want to use in the click animation only
127156

128-
8) Or initialize through a struct `ButtonClick.State`
157+
158+
159+
#### Usage `ButtonClick.State`
160+
161+
Or initialize through a struct `ButtonClick.State`
129162

130163
```swift
131164
import ButtonClickStyle

0 commit comments

Comments
 (0)