可变为不可变对象

Sub*_*rat 2 cocoa

有没有办法在可可中转换可变对象转换为不可变对象?我使用过NSMutableDictionary*mut = [[NSMutableDictionary alloc] initWithDictionary:copyItems:]; 但是这个字典在许多其他地方使用而没有可变的东西.

最诚挚的问候,Subrat

Amy*_*all 7

NSDictionary dictionaryWithDictionary:

  • 或``[myDictionary copy]` (4认同)