Update README; Fix travis.yml

This commit is contained in:
zekunyan
2016-10-07 23:45:13 +08:00
parent e928aec523
commit 53dbfefdf4
7 changed files with 6 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ cache: cocoapods
podfile: Example/Podfile
before_install:
- gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet
- pod install --project-directory=Example-Swift
- pod install --project-directory=Example
script:
- set -o pipefail
- xcodebuild -version

View File

@@ -41,13 +41,13 @@ import TTGSnackbar
# Usage
## Show a simple message
![Example](http://7nj2iz.com1.z0.glb.clouddn.com/TTGSnackbar_2.png)
![Example](https://github.com/zekunyan/TTGSnackbar/raw/master/Resources/snackbar_1.png)
```
let snackbar = TTGSnackbar.init(message: "Message", duration: .Short)
snackbar.show()
```
## Show a simple message with an action button
![Example](http://7nj2iz.com1.z0.glb.clouddn.com/TTGSnackbar_3.png)
![Example](https://github.com/zekunyan/TTGSnackbar/raw/master/Resources/snackbar_2.png)
```
let snackbar = TTGSnackbar.init(message: "Message", duration: .Middle, actionText: "Action")
{ (snackbar) -> Void in
@@ -57,7 +57,7 @@ snackbar.show()
```
## Show a simple message with a long running action
![Example](http://7nj2iz.com1.z0.glb.clouddn.com/TTGSnackbar_5.png)
![Example](https://github.com/zekunyan/TTGSnackbar/raw/master/Resources/snackbar_3.png)
```
let snackbar = TTGSnackbar.init(message: "Message", duration: .Forever, actionText: "Action")
{ (snackbar) -> Void in
@@ -71,7 +71,7 @@ snackbar.show()
```
## Show a simple message with two action buttons
![Example](http://7nj2iz.com1.z0.glb.clouddn.com/TTGSnackbar_9.png)
![Example](https://github.com/zekunyan/TTGSnackbar/raw/master/Resources/snackbar_4.png)
```
let snackbar: TTGSnackbar = TTGSnackbar.init(message: "Two actions !", duration: .Long)
@@ -89,7 +89,7 @@ snackbar.show()
```
## Show a simple message with an icon image
![Example](http://7nj2iz.com1.z0.glb.clouddn.com/TTGSnackbar_10.jpg)
![Example](https://github.com/zekunyan/TTGSnackbar/raw/master/Resources/snackbar_5.jpg)
```
let snackbar: TTGSnackbar = TTGSnackbar.init(message: "Two actions !", duration: .Long)

BIN
Resources/snackbar_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
Resources/snackbar_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
Resources/snackbar_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
Resources/snackbar_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
Resources/snackbar_5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB