我有NSDictionary
并复制了NSDictionary
:
NSDictionary *immutableDict = (NSDictionary *)json;
NSMutableDictionary *mutableDict = [immutableDict mutableCopy];
我想将其转换为NSString
选择类别,然后编辑包含。
NSString * name = [mutableDict objectForKey:@"category"];
name = [name stringByAppendingString:[NSString stringWithFormat:@"mytexttoadd"]];
但是当我想更改此NSString
我的应用崩溃时,因为NSString
是NSCFArray
..
如何将其设为NSString
以便我可以编辑它?