Subclassing NSMutableDictionary

前端 未结 3 1551
难免孤独
难免孤独 2021-02-07 22:42

I am trying to implement a subclass of NSMutableDictionary that returns nil instead of throwing a NSUndefinedKeyException when the key is not present in the Dictionary.

3条回答
  •  猫巷女王i
    2021-02-07 22:56

    Are you sure you are not getting the exception when passing in "nil" for a KEY (not a value)?

提交回复
热议问题