Why does NSDictionary report an unusual class name?

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

This code prints \"__NSDictionary0\".

For my

5条回答
  •  再見小時候
    2021-02-10 10:45

    If you want to test for mutability, your best bet would probably be conformsToProtocol: @protocol(NSMutableCopying)

提交回复
热议问题