How to have stored properties in Swift, the same way I had on Objective-C?

As in Objective-C, you can’t add stored property to existing classes. If you’re extending an Objective-C class (UIView is definitely one), you can still use Associated Objects to emulate stored properties: for Swift 1 import ObjectiveC private var xoAssociationKey: UInt8 = 0 extension UIView { var xo: PFObject! { get { return objc_getAssociatedObject(self, &xoAssociationKey) as? … Read more