gpt4 book ai didi

ios - Objective C-从数组中字典的键值添加数据

转载 作者:行者123 更新时间:2023-11-28 18:15:41 25 4
gpt4 key购买 nike

如何将 [rcImage = "1475004450741343.jpg,1475004451955166.jpg"] 从 dic 存储到数组。

    {
id = 24;
rcImage = "1475004450741343.jpg,1475004451955166.jpg";
registrationNumber = RJ01;
registrationdate = "2015-09-28 00:00:00.0";
regno = RJ01;
}

这些是我的代码。

NSMutableArray *imageArray=[[NSMutableArray alloc]init];
imageArray=[paramData objectForKey:@"imageRC"];
NSLog(@"%@",imageArray);

请帮忙?

最佳答案

您使用此代码

NSMutableArray *imageArray = [[NSMutableArray alloc]init];
NSString *imageString = [paramData objectForKey:@"rcImage"];
NSLog(@"--%@",imageString);
imageArray = [imageString componentsSeparatedByString:@","];
NSLog(@"--%@",imageArray);

关于ios - Objective C-从数组中字典的键值添加数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41056018/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com