Skip to content

Instantly share code, notes, and snippets.

@nathanborror
Last active August 29, 2015 14:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nathanborror/3f16f445bd48dd236e2a to your computer and use it in GitHub Desktop.
Save nathanborror/3f16f445bd48dd236e2a to your computer and use it in GitHub Desktop.
import UIKit
struct Styles {
// MARK: Global styles
static let margin:CGFloat = 8.0
static let padding:CGFloat = 8.0
static let tint = UIColor(red: 0.0, green: 0.48, blue: 1.0, alpha: 1.0)
static let backgroundColor = UIColor.whiteColor()
static let mask = UIColor.blackColor()
static let borderWidth:CGFloat = 0.5
static let cornderRadius:CGFloat = 5.0
struct FontSize {
static let header:CGFloat = 19.0
static let regular:CGFloat = 14.0
static let small:CGFloat = 12.0
}
struct FontFace {
static let light = "HelveticaNeue-Light"
static let regular = "HelveticaNeue"
static let medium = "HelveticaNeue-Medium"
static let bold = "HelveticaNeue-Bold"
}
struct Font {
static let header = UIFont(name: Styles.FontFace.regular, size: Styles.FontSize.header)!
static let headerBold = UIFont(name: Styles.FontFace.bold, size: Styles.FontSize.header)!
static let regular = UIFont(name: Styles.FontFace.regular, size: Styles.FontSize.regular)!
static let regularBold = UIFont(name: Styles.FontFace.bold, size: Styles.FontSize.regular)!
static let small = UIFont(name: Styles.FontFace.regular, size: Styles.FontSize.small)!
static let smallBold = UIFont(name: Styles.FontFace.bold, size: Styles.FontSize.small)!
}
struct FontColor {
static let regular = UIColor.blackColor()
static let light = UIColor(white: 0.0, alpha: 0.5)
static let tint = Styles.tint
}
// MARK: Model styles
struct File {
static let identifier = "FileCell"
static let rowHeight:CGFloat = 48.0
}
struct User {
static let identifier = "UserCell"
static let rowHeight:CGFloat = 48.0
}
// MARK: View styles
struct Button {
static let backgroundColor = UIColor.whiteColor()
static let borderColor = UIColor.blackColor()
static let borderWidth:CGFloat = Styles.borderWidth
static let cornerRadius:CGFloat = Styles.cornderRadius
static let textColor = UIColor.blackColor()
static let highlightedColor = Styles.Button.textColor
static let highlightedTextColor = Styles.Button.backgroundColor
}
struct Field {
static let padding:CGFloat = 8.0
static let backgroundColor = UIColor.whiteColor()
static let borderColor = UIColor.blackColor()
static let borderWidth:CGFloat = Styles.borderWidth
static let cornerRadius:CGFloat = Styles.cornderRadius
static let textColor = UIColor.blackColor()
}
struct NavigationBar {
static let backgroundColor = UIColor.whiteColor()
static let tint = UIColor.blackColor()
}
struct Profile {
static let width:CGFloat = 32.0
static let height:CGFloat = 32.0
static let cornerRadius:CGFloat = Styles.Profile.height / 2.0
static let backgroundColor = UIColor.blackColor()
}
struct Progress {
static let height:CGFloat = 2.0
static let color = UIColor.blackColor()
}
struct Label {
static let font = Styles.Font.regular
}
struct Seperator {
static let height:CGFloat = Styles.borderWidth
static let color = UIColor.blackColor()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment