如何创建iphonesdk的Url数组
嗨,我想知道我该怎么做: 我有这个如何创建iphonesdk的Url数组,iphone,arrays,sdk,Iphone,Arrays,Sdk,嗨,我想知道我该怎么做: 我有这个 networkImages = [[NSArray alloc] initWithObjects:@"http:www.mydomain.com/photo.png", @"http:www.mydomain.com/photo2.png", @"http:www.mydomain.com/photo3.png", @"http:www.mydomain.com/photo4.png" ,nil]; 我想知道我是否能做到 NSArray * photo;
networkImages = [[NSArray alloc] initWithObjects:@"http:www.mydomain.com/photo.png", @"http:www.mydomain.com/photo2.png", @"http:www.mydomain.com/photo3.png", @"http:www.mydomain.com/photo4.png" ,nil];
我想知道我是否能做到
NSArray * photo;
networkImages = [[NSArray alloc] initWithObjects: photo, nil];
我从web服务器上下载使用JSON解析的照片数组。
我试过了,但我有一个错误
由于未捕获异常而终止应用程序
“NSInvalidArgumentException”,原因:“-[\uu NSArrayI length]:
已将无法识别的选择器发送到实例0x383940'
对不起,我的英语 如果您只需要阵列中的一个阵列。。 试试这个
试试这个->[networkImages addObjectsFromArray:photo];谢谢,我解决了更改网络图像=[[NSArray alloc]initWithArray:photo]@akk initWithObjects:也应该可以工作。OP遗漏了其他东西。
NSArray * photo;
networkImages = [NSArray arrayWithArray: photo];