Rúguǒ nǐ swizzlele NSMutableDictionary de “setObject:ForKeyedSubscript:” Fāngfǎ. - (Void)xxx_setObject:(Id)obj forKeyedSubscript:(Id)key { if (!Key ||!Obj) return; [self xxx_setObject:Obj forKeyedSubscript:Key]; } nàme shānchú “||!Obj” jí kě jiějué!
朗读
244 / 5,000
翻译结果
If you swizzle the "setObject:forKeyedSubscript:" method of NSMutableDictionary.
- (void)xxx_setObject:(id)obj forKeyedSubscript:(id<NSCopying>)key
{
if (!key || !obj) return;
[self xxx_setObject:obj forKeyedSubscript:key];
}
Then delete "|| !obj" and it will be solved!
Topic:
App & System Services
SubTopic:
Core OS
Tags: