This might be very basic question but I was wondering why can\'t I assign nil as NSDictionary value? I have following statement many places in my code. If [q objectFor
When using this method:
func setObject(_ anObject: Any, forKey aKey: NSCopying)
Parameters (according to Apple doc's):
anObject:
Raises an invalidArgumentException if anObject is nil. If you need to represent a nil value in the dictionary, use NSNull .
aKey
Raises an invalidArgumentException if aKey is nil.