is it true that the key values for NSMutableDictionary can only be strings?
I was trying to use objects, but I am getting a warning.
From the docs:
In general, a key can be any object (provided that it conforms to the NSCopying protocol—see below), but note that when using key-value coding the key must be a string (see Key-Value Coding Fundamentals).
What warning are you getting?
You can use any object, but the object must implement -[NSObject hash]
, -[NSObject isEqual:]
, and the NSCopying
protocol.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With