1. 1
  1.  

  2. 1

    A very little Swift snippet that I was unreasonably proud of. Note that the title is false: you can’t add stored properties in Swift extensions, but this snippet shows you something that’s functionally equivalent.

    1. 1

      objc_setAssociatedObject… good old trick, useful to attach properties to certain objects passed to internal APIs and back, like MapKit annotations.