當前位置:成語大全網 - 新華字典 - ios開發nsdictionary怎麽轉換為nsmutabledictionary

ios開發nsdictionary怎麽轉換為nsmutabledictionary

我提供壹個思路,不確定對不對哈.

妳可以新建壹個可變的字典,然後把不可變的字典裝進去.

NSDictionary *dic = [NSDictionary dictionaryWithObject:@"123" forKey:@"321"];

NSMutableDictionary *newdic = [NSMutableDictionary dictionaryWithDictionary:dic];