Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Jul 2, 2019
1 parent 592aa00 commit a516c99
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ See project's backers in [Sponsors](https://github.com/ivanvorobei/SPAlert#spons
- [Quick Start](#quick-start)
- [Usage](#usage)
- [Duration](#duration)
- [Dark Mode](#dark-mode)
- [Layout](#layout)
- [Dismiss by Tap](#dismiss-by-tap)
- [Haptic](#haptic)
- [Corner Radius](#corner-radius)
- [Dark Mode](#dark-mode)
- [Required Presets](#required-presets)
- [Sponsors](#sponsors)
- [Other Projects +gif](#my-projects)
Expand Down Expand Up @@ -91,6 +91,22 @@ alertView.duration = 3
alertView.present()
```

### Dark Mode

<img align="left" src="https://github.com/ivanvorobei/SPAlert/blob/master/Resources/Dark-Mode-Preview.jpg" width="220">

The default mode is `Dark Mode`. No additional configuration is required. As soon as the user change the interface to dark, all alerts will appear dark.

For check state of user appearance I am use `traitCollection`:

```swift
if self.traitCollection.userInterfaceStyle == .dark {
return true
}
```

It available sice iOS 12, for early using always Light Mode.

### Layout

Here you can change the sizes and spaces:
Expand Down Expand Up @@ -128,22 +144,6 @@ I use a corner radius like an Apple. If you need to change it, see the property
alertView.layer.cornerRadius = 40
```

### Dark Mode

<img align="left" src="https://github.com/ivanvorobei/SPAlert/blob/master/Resources/Dark-Mode-Preview.jpg" width="220">

The default mode is `Dark Mode`. No additional configuration is required. As soon as the user change the interface to dark, all alerts will appear dark.

For check state of user appearance I am use `traitCollection`:

```swift
if self.traitCollection.userInterfaceStyle == .dark {
return true
}
```

It available sice iOS 12, for early using always Light Mode.

## Required Presets

I will add new types and presets as needed. I will add animation and custom layout to them for a better experience. To know what presets need to be done, please inform me. You do not need to be shy. Make a new [issue](https://github.com/ivanvorobei/SPAlert/issues) and describe what kind of graphics or animation you would like. I will try to quickly add new items.
Expand Down

0 comments on commit a516c99

Please sign in to comment.