Commit 18dcbf6c by Daniel Dahan

removed DeviceType and updated default colors for Switch

parent 7e87e2ac
......@@ -30,13 +30,6 @@
import UIKit
public enum DeviceType {
case pad
case phone
case TV
case unspecified
}
public struct Device {
/// Gets the model name for the device.
public static var model: String {
......@@ -80,8 +73,8 @@ public struct Device {
default: return identifier
}
}
/// Retrieves the current device type.
/// Retrieves the current device type.
public static var userInterfaceIdiom: UIUserInterfaceIdiom {
return UIDevice.current().userInterfaceIdiom
}
......
......@@ -192,7 +192,7 @@ public class Switch: UIControl {
buttonOnColor = Color.blue.darken2
trackOnColor = Color.blue.lighten3
buttonOffColor = Color.blueGrey.lighten4
trackOffColor = Color.blueGrey.lighten3
trackOffColor = Color.grey.lighten3
buttonOnDisabledColor = Color.grey.lighten2
trackOnDisabledColor = Color.grey.lighten3
buttonOffDisabledColor = Color.grey.lighten2
......@@ -200,7 +200,7 @@ public class Switch: UIControl {
case .dark:
buttonOnColor = Color.blue.lighten1
trackOnColor = Color.blue.lighten2.withAlphaComponent(0.5)
buttonOffColor = Color.blueGrey.lighten3
buttonOffColor = Color.grey.lighten3
trackOffColor = Color.blueGrey.lighten4.withAlphaComponent(0.5)
buttonOnDisabledColor = Color.grey.darken3
trackOnDisabledColor = Color.grey.lighten1.withAlphaComponent(0.2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment