我只有一个存储应用程序常量的结构如下:
struct Constant {
static let ParseApplicationId = "xxx"
static let ParseClientKey = "xxx"
static var AppGreenColor: UIColor {
return UIColor(hexString: "67B632")
}
}
Run Code Online (Sandbox Code Playgroud)
Constant.ParseClientKey例如,通过调用可以在Swift代码中使用这些常量.但在我的代码中,它还包含一些Objective C类.所以我的问题是如何在Objective C代码中使用这些常量?
如果这种声明常量的方法不好那么创建全局常量以在Swift和Objective C代码中使用的最佳方法是什么?