Skip to content

Instantly share code, notes, and snippets.

@paulrehkugler
Created March 29, 2016 19:03
Show Gist options
  • Save paulrehkugler/f5f76ecc1b43984ac228253028ecfeb1 to your computer and use it in GitHub Desktop.
Save paulrehkugler/f5f76ecc1b43984ac228253028ecfeb1 to your computer and use it in GitHub Desktop.
Force Initialization for Constants
struct Constants {
let leftPadding: CGFloat
let rightPadding: CGFloat
static func defaultConfiguration() -> Constants { /* init */ }
static func compactConfiguration() -> Constants { /* init with different stuff */ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment