Merge pull request #178 from cozzin/updateReadme

Update README
This commit is contained in:
Antoine Cœur
2019-09-07 21:41:55 +08:00
committed by GitHub

View File

@@ -9,6 +9,12 @@ Toaster
Android-like toast with very simple interface. (formerly JLToast)
Screenshots
-----------
![Toaster Screenshot](https://raw.github.com/devxoul/Toaster/master/Screenshots/Toaster.png)
Features
--------
@@ -63,7 +69,7 @@ Toast(text: "Hello, world!", delay: Delay.short, duration: Delay.long)
toast.show()
toast.cancel() // remove toast immediately
```
- **Removing current toast**:
```swift
@@ -71,7 +77,7 @@ Toast(text: "Hello, world!", delay: Delay.short, duration: Delay.long)
currentToast.cancel()
}
```
- **Removing all toasts**:
```swift
@@ -97,6 +103,13 @@ Supported appearance properties are:
| `font` | `UIFont` | Font |
| `bottomOffsetPortrait` | `CGFloat` | Vertical offfset from bottom in portrait mode |
| `bottomOffsetLandscape` | `CGFloat` | Vertical offfset from bottom in landscape mode |
| `shadowPath` | `CGPath` | The shape of the layers shadow |
| `shadowColor` | `UIColor` | The color of the layers shadow |
| `shadowOpacity` | `Float` | The opacity of the layers shadow |
| `shadowOffset` | `CGSize` | The offset (in points) of the layers shadow |
| `shadowRadius` | `CGFloat` | The blur radius (in points) used to render the layers shadow |
| `maxWidthRatio` | `CGFloat` | The width ratio of toast view in window |
| `useSafeAreaForBottomOffset` | `Bool` | A Boolean value that determines `safeAreaInsets.bottom` is added to `bottomOffset` |
### Attributed string
@@ -114,12 +127,6 @@ ToastCenter.default.isSupportAccessibility = false
```
Screenshots
-----------
![Toaster Screenshot](https://raw.github.com/devxoul/Toaster/master/Screenshots/Toaster.png)
License
-------