我试图在NSMMetable 阵列中保存图像,但无法工作
这就是我正在做的
[imagesList addObject:[UIImage imageNamed:@"b.png"]];
after executing this line I noticed that the number of objects remains 0 any reason ?
谢谢 谢谢
我在若干领域重复这一守则:
在全球范围内,我宣布:
NSMutableArray *imagesList;
NSUserDefaults *imagesHistory;
在我的观点中,我写道:
imagesHistory=[NSUserDefaults standardUserDefaults]; //imagesHistory is created globallt as NSUserDefault imagesHistory
[imagesHistory setObject:imagesList forKey:@"images history"];
UIImage *image;
image=[UIImage imageNamed:@"b.png"];
[imagesList addObject:image];
imagesHistory=[NSUserDefaults standardUserDefaults];
[imagesHistory setObject:imagesList forKey:@"images history"];
我写道:(即使我不需要在添加弦的时候这样做...)
imagesList = [[NSMutableArray alloc] init];