Skip to content

Instantly share code, notes, and snippets.

View wagnercasey's full-sized avatar

Casey Wagner wagnercasey

View GitHub Profile
@wagnercasey
wagnercasey / fontWeight.swift
Last active March 3, 2017 19:06
UIFontWeight Struct for autocomplete
struct FontWeight {
static let ultraLight: CGFloat = UIFontWeightUltraLight
static let thin: CGFloat = UIFontWeightThin
static let light: CGFloat = UIFontWeightLight
static let regular: CGFloat = UIFontWeightRegular
static let medium: CGFloat = UIFontWeightMedium
static let semiBold: CGFloat = UIFontWeightSemibold
static let bold: CGFloat = UIFontWeightBold
static let heavy: CGFloat = UIFontWeightHeavy
static let black: CGFloat = UIFontWeightBlack
@wagnercasey
wagnercasey / NotificationCenterSugar.swift
Last active December 27, 2016 15:13
Notification Center Sugar
enum NotificationCenterKey : String {
case screaming, yelling, hollering
}
extension NotificationCenter {
static func post(notification : NotificationCenterKey){
NotificationCenter.default.post(name: Notification.Name(rawValue: notification.rawValue), object: nil)
}
@wagnercasey
wagnercasey / Snack.swift
Created December 21, 2016 19:23
Predefining Swift sort and filter functions
struct Snack {
var name : String
var calories : Int
var flavor : Flavor
enum Flavor {
case sour, sweet, spicy, bitter
}