2021-04-26 10:57:50 +02:00
|
|
|
//
|
|
|
|
// AppearancePreference.swift
|
|
|
|
// Mastodon
|
|
|
|
//
|
|
|
|
// Created by MainasuK Cirno on 2021-4-26.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
extension UserDefaults {
|
|
|
|
|
|
|
|
@objc dynamic var customUserInterfaceStyle: UIUserInterfaceStyle {
|
|
|
|
get {
|
|
|
|
register(defaults: [#function: UIUserInterfaceStyle.unspecified.rawValue])
|
|
|
|
return UIUserInterfaceStyle(rawValue: integer(forKey: #function)) ?? .unspecified
|
|
|
|
}
|
2021-04-27 10:26:59 +02:00
|
|
|
set { self[#function] = newValue.rawValue }
|
2021-04-26 10:57:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|