Skip to content

Commit a516c99

Browse files
committed
Update README.md
1 parent 592aa00 commit a516c99

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ See project's backers in [Sponsors](https://github.com/ivanvorobei/SPAlert#spons
2222
- [Quick Start](#quick-start)
2323
- [Usage](#usage)
2424
- [Duration](#duration)
25+
- [Dark Mode](#dark-mode)
2526
- [Layout](#layout)
2627
- [Dismiss by Tap](#dismiss-by-tap)
2728
- [Haptic](#haptic)
2829
- [Corner Radius](#corner-radius)
29-
- [Dark Mode](#dark-mode)
3030
- [Required Presets](#required-presets)
3131
- [Sponsors](#sponsors)
3232
- [Other Projects +gif](#my-projects)
@@ -91,6 +91,22 @@ alertView.duration = 3
9191
alertView.present()
9292
```
9393

94+
### Dark Mode
95+
96+
<img align="left" src="https://github.com/ivanvorobei/SPAlert/blob/master/Resources/Dark-Mode-Preview.jpg" width="220">
97+
98+
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.
99+
100+
For check state of user appearance I am use `traitCollection`:
101+
102+
```swift
103+
if self.traitCollection.userInterfaceStyle == .dark {
104+
return true
105+
}
106+
```
107+
108+
It available sice iOS 12, for early using always Light Mode.
109+
94110
### Layout
95111

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

131-
### Dark Mode
132-
133-
<img align="left" src="https://github.com/ivanvorobei/SPAlert/blob/master/Resources/Dark-Mode-Preview.jpg" width="220">
134-
135-
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.
136-
137-
For check state of user appearance I am use `traitCollection`:
138-
139-
```swift
140-
if self.traitCollection.userInterfaceStyle == .dark {
141-
return true
142-
}
143-
```
144-
145-
It available sice iOS 12, for early using always Light Mode.
146-
147147
## Required Presets
148148

149149
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.

0 commit comments

Comments
 (0)