fileprivate var StringIdentifierHandle: UInt8 = 2 extension UIView { var stringIdentifier: String? { get { return objc_getAssociatedObject(self, &StringIdentifierHandle) as? String } set { objc_setAssociatedObject(self, &StringIdentifierHandle, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) } } }