I'm building an iPhone app using Swift. I've created a Settings class and declared some static variables in them, for storing colors. However, whenever I try to access the first variable I've declared (such as Settings.grayBorderColor below), the app crashes (with some message about Settings.grayBorderColor.unsafeMutableAddressor). I can access any properties below the first one just fine, and if I switch the order of the properties/variables, it is still accessing whichever property is declared first that causes the crash.
class Settings {
// MARK: Properties
static let grayBorderColor = UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.0)
static let lightGreenColor = UIColor(red: 0.66, green: 1.0, blue: 0.66, alpha: 1.0)
static let darkGreenColor = UIColor(red: 0.66, green: 0.0, blue: 0.0, alpha: 1.0)
static let darkRedColor = UIColor(red: 0.66, green: 0.0, blue: 0.0, alpha: 1.0)
static let lightRedColor = UIColor(red: 1, green: 0.66, blue: 0.66, alpha: 1.0)
static let lightGrayColor = UIColor.lightGrayColor()
static let mediumGrayColor = UIColor.darkGrayColor()
}
What am I doing wrong?