I\'m developing a Cocoa application, and I\'m using constant NSString
s as ways to store key names for my preferences.
I understand this is a good idea b
If you want to call something like this NSString.newLine;
from objective c, and you want it to be static constant, you can create something like this in swift:
public extension NSString {
@objc public static let newLine = "\n"
}
And you have nice readable constant definition, and available from within a type of your choice while stile bounded to context of type.