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.
27 lines
1.2 KiB
Swift
27 lines
1.2 KiB
Swift
|
|
@objc(LKAppearanceUtilities)
|
|
final class AppearanceUtilities : NSObject {
|
|
|
|
@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 ]
|
|
}
|
|
}
|
|
}
|