mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.5 KiB
Swift
34 lines
1.5 KiB
Swift
5 years ago
|
|
||
4 years ago
|
@objc final class SNAppearance : NSObject {
|
||
5 years ago
|
|
||
|
@objc static func switchToSessionAppearance() {
|
||
|
if #available(iOS 13, *) {
|
||
|
UINavigationBar.appearance().barTintColor = Colors.navigationBarBackground
|
||
|
UINavigationBar.appearance().isTranslucent = false
|
||
|
UINavigationBar.appearance().tintColor = Colors.text
|
||
|
UIToolbar.appearance().barTintColor = Colors.navigationBarBackground
|
||
|
UIToolbar.appearance().isTranslucent = false
|
||
|
UIToolbar.appearance().tintColor = Colors.text
|
||
|
UISwitch.appearance().onTintColor = Colors.accent
|
||
|
UINavigationBar.appearance().titleTextAttributes = [ NSAttributedString.Key.foregroundColor : Colors.text ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@objc static func switchToImagePickerAppearance() {
|
||
|
if #available(iOS 13, *) {
|
||
|
UINavigationBar.appearance().barTintColor = .white
|
||
|
UINavigationBar.appearance().isTranslucent = false
|
||
|
UINavigationBar.appearance().tintColor = .black
|
||
|
UINavigationBar.appearance().titleTextAttributes = [ NSAttributedString.Key.foregroundColor : UIColor.black ]
|
||
|
}
|
||
|
}
|
||
4 years ago
|
|
||
|
@objc static func switchToDocumentPickerAppearance() {
|
||
|
if #available(iOS 13, *) {
|
||
|
let textColor: UIColor = isDarkMode ? .white : .black
|
||
|
UINavigationBar.appearance().tintColor = textColor
|
||
|
UINavigationBar.appearance().titleTextAttributes = [ NSAttributedString.Key.foregroundColor : textColor ]
|
||
|
}
|
||
|
}
|
||
5 years ago
|
}
|