Simply I have a struct that stores the application constants as below:
struct Constant {
static let ParseApplicationId = \"xxx\"
static let ParseCli
You should make the let statements private if you want to make other Swift types in your code to access these constants only via class:
private let AppGreenColor = UIColor(red: 0.2, green: 0.7, blue: 0.3 alpha: 1.0)
@objc class Constant {
class func appGreenColor() -> UIColor { return AppGreenColor }
}
In Swift, you can use them like this:
UIColor *greenColor = Constant.appGreenColor
The following line will not compile anymore now since the let statement is private:
UIColor *greenColor = appGreenColor