Skip to content

Commit 863419b

Browse files
authoredAug 28, 2017
Update README.md
1 parent 5cca7c4 commit 863419b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ pod "JPSwitchButton"
3030
let switchButton = JPSwitchButton(frame: buttonFrame, offColor: .white, onColor: blue, image: nil, title: "Press me to turn on", description: "Currently I am off", isOn: false)
3131
```
3232

33+
![Alt text](https://github.com/Julp04/JPSwitchButton/blob/master/jpswitchbutton_0.gif)
34+
3335
### Button With an Image
3436

3537
```swift
3638
let twitterButton = JPSwitchButton(frame: buttonFrame2, offColor: .white, onColor: twitterBlue, image: #imageLiteral(resourceName: "twitter_on"), title: "Connect with Twitter", description: "Add your twitter account!")
3739
```
3840

41+
![Alt text](https://github.com/Julp04/JPSwitchButton/blob/master/jpswitchbutton_2.gif)
42+
3943
### On Button Click
4044
You can choose what happens when your button is clicked by writing your code inside the block
4145
```swift
@@ -47,7 +51,6 @@ switchButton.onClick = {
4751
}
4852
```
4953

50-
5154
### On long press
5255
Create different action for a long press
5356
```swift
@@ -59,6 +62,8 @@ twitterButton.onLongPress = {
5962
}
6063
```
6164

65+
![Alt text](https://github.com/Julp04/JPSwitchButton/blob/master/jpswitchbutton_3.gif)
66+
6267
## Changing Button State
6368

6469
### Switch State

0 commit comments

Comments
 (0)