I want to have a NSDictionary
that maps from UIView
s to something else.
However, since UIViews do not implement the NSCopying
protocol, I can't use them directly as dictionary keys.
You can use an NSValue
holding the pointer to the UIView
and use this as key. NSValues
are copyable. but, if the view is destroyed, the NSValue
will hold a
junk pointer.