File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
Pod ::Spec . new do |s |
2
2
3
3
s . name = "SPAlert"
4
- s . version = "2.0.15 "
4
+ s . version = "2.0.16 "
5
5
s . summary = "Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets."
6
6
s . homepage = "https://github.com/IvanVorobei/SPAlert"
7
7
s . source = { :git => "https://github.com/IvanVorobei/SPAlert.git" , :tag => s . version }
Original file line number Diff line number Diff line change @@ -271,9 +271,14 @@ open class SPAlertView: UIView {
271
271
*/
272
272
private var isDarkMode : Bool {
273
273
if #available( iOS 12 . 0 , * ) {
274
- if traitCollection. userInterfaceStyle == . dark {
274
+ switch UIApplication . shared. windows. first? . traitCollection. userInterfaceStyle ?? . light {
275
+ case . dark:
275
276
return true
276
- } else {
277
+ case . light:
278
+ return false
279
+ case . unspecified:
280
+ return false
281
+ @unknown default :
277
282
return false
278
283
}
279
284
} else {
You can’t perform that action at this time.
0 commit comments