Introduce color provider to encapsulate check for iOS 13 availability

This commit is contained in:
Danny Moesch 2019-10-01 22:36:22 +02:00
parent e0c32003e3
commit 51c9510f3d
12 changed files with 80 additions and 41 deletions

View file

@ -41,14 +41,6 @@ public class Globals {
public static let passwordFont = UIFont(name: "Courier-Bold", size: UIFont.labelFontSize - 1)
// UI related
public static let red = UIColor.systemRed
public static let blue = UIColor.systemBlue
public static let black: UIColor = {
if #available(iOSApplicationExtension 13.0, *) {
return UIColor.label
}
return UIColor.black
}()
public static let tableCellButtonSize = CGFloat(20.0)
private init() { }