如何将[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 - 从数组的字典的键值中进行客观C加数据,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41056018/

10-13 04:04