Skip to content

Commit e4c652c

Browse files
committed
Update README.md
1 parent 215a654 commit e4c652c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,17 @@ alertView.layer.cornerRadius = 40
130130

131131
### Dark Mode
132132

133+
<img align="left" src="https://github.com/ivanvorobei/SPAlert/blob/master/Resources/Dark-Mode-Preview.jpg" width="250">
134+
133135
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.
134136

135-
<img src="https://github.com/ivanvorobei/SPAlert/blob/master/Resources/Dark-Mode-Preview.jpg" width="250">
137+
For check state of user appearance I am use `traitCollection`:
138+
139+
```swift
140+
if self.traitCollection.userInterfaceStyle == .dark { return true }
141+
```
142+
143+
It available sice iOS 12, for early using always Light Mode.
136144

137145
## Required Presets
138146

0 commit comments

Comments
 (0)