Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import HealthKit


extension NumberFormatter {
public static func glucoseFormatter(for unit: HKUnit) -> NumberFormatter {
static func glucoseFormatter(for unit: HKUnit) -> NumberFormatter {
let numberFormatter = NumberFormatter()

numberFormatter.numberStyle = .decimal
Expand Down
52 changes: 52 additions & 0 deletions Common/Extensions/UIColor+HIG.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// UIColor+HIG.swift
// Naterade
//
// Created by Nathan Racklyeft on 1/23/16.
// Copyright © 2016 Nathan Racklyeft. All rights reserved.
//

import UIKit


extension UIColor {
// MARK: - HIG colors
// See: https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/

static func HIGTealBlueColor() -> UIColor {
return UIColor(red: 90 / 255, green: 200 / 255, blue: 250 / 255, alpha: 1)
}

static func HIGYellowColor() -> UIColor {
return UIColor(red: 1, green: 204 / 255, blue: 0, alpha: 1)
}

static func HIGOrangeColor() -> UIColor {
return UIColor(red: 1, green: 149 / 255, blue: 0 / 255, alpha: 1)
}

static func HIGPinkColor() -> UIColor {
return UIColor(red: 1, green: 45 / 255, blue: 85 / 255, alpha: 1)
}

static func HIGBlueColor() -> UIColor {
return UIColor(red: 0, green: 122 / 255, blue: 1, alpha: 1)
}

static func HIGGreenColor() -> UIColor {
return UIColor(red: 76 / 255, green: 217 / 255, blue: 100 / 255, alpha: 1)
}

static func HIGRedColor() -> UIColor {
return UIColor(red: 1, green: 59 / 255, blue: 48 / 255, alpha: 1)
}

static func HIGPurpleColor() -> UIColor {
return UIColor(red: 88 / 255, green: 86 / 255, blue: 214 / 255, alpha: 1)
}

static func HIGGrayColor() -> UIColor {
return UIColor(red: 142 / 255, green: 143 / 255, blue: 147 / 255, alpha: 1)
}

}
32 changes: 32 additions & 0 deletions Common/Extensions/UIColor.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// UIColor.swift
// Naterade
//
// Created by Nathan Racklyeft on 1/23/16.
// Copyright © 2016 Nathan Racklyeft. All rights reserved.
//

import UIKit


extension UIColor {
@nonobjc static var tintColor: UIColor? = nil

@nonobjc static let secondaryLabelColor = UIColor.HIGGrayColor()

@nonobjc static let cellBackgroundColor = UIColor(white: 239 / 255, alpha: 1)

@nonobjc static let gridColor = UIColor(white: 193 / 255, alpha: 1)

@nonobjc static let IOBTintColor = UIColor.HIGOrangeColor()

@nonobjc static let COBTintColor = UIColor(red: 99 / 255, green: 218 / 255, blue: 56 / 255, alpha: 1)

@nonobjc static let agingColor = UIColor.HIGYellowColor()

@nonobjc static let staleColor = UIColor.HIGRedColor()

@nonobjc static let unknownColor = UIColor(red: 198 / 255, green: 199 / 255, blue: 201 / 255, alpha: 1)

@nonobjc static let deleteColor = UIColor.HIGRedColor()
}
Loading