I\'m creating custom elements in my app and want to match the look and feel of the new iOS. iOS 7 introduced to us a very common lighter blue color, the default color or tin
This extension gives you native system blue color.
extension UIColor {
static var systemBlue: UIColor {
return UIButton(type: .system).tintColor
}
}
UPDATE
Please forget what I wrote above, just figured out - there're native extension with predefined system colors we've been looking for, including system blue:
// System colors
extension UIColor {
/* Some colors that are used by system elements and applications.
* These return named colors whose values may vary between different contexts and releases.
* Do not make assumptions about the color spaces or actual colors used.
*/
...
@available(iOS 7.0, *)
open class var systemBlue: UIColor { get }
...
}
You can use it directly:
myView.tintColor = .systemBlue