Skip to content

Instantly share code, notes, and snippets.

@nixta
Created May 5, 2017 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nixta/06eb01ae8e67d14672d1305ed6379986 to your computer and use it in GitHub Desktop.
Save nixta/06eb01ae8e67d14672d1305ed6379986 to your computer and use it in GitHub Desktop.
Name an AGSGraphicsOverlay
extension AGSGraphicsOverlay {
fileprivate struct AssociatedKeys {
static var referenceNameKey = "geodev_referenceName"
}
var referenceName:String? {
get {
return objc_getAssociatedObject(self, &AssociatedKeys.referenceNameKey) as? String
}
set {
objc_setAssociatedObject(self, &AssociatedKeys.referenceNameKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment