Why does NSDictionary report an unusual class name?

后端 未结 5 1115
孤独总比滥情好
孤独总比滥情好 2021-02-10 09:59
NSDictionary *dict = [NSDictionary dictionary];
NSLog(@\"%@\", NSStringFromClass([dict class])); 

This code prints \"__NSDictionary0\".

For my

5条回答
  •  我寻月下人不归
    2021-02-10 10:21

    For an NSDictionary mutability test, could't you just to a 'respondsToSelector' for a method that only an NSMutableDictionary would have, like addObject:ForKey:?

提交回复
热议问题