objective c - How to retrieve an array of images from a plist file which is displayed in an imageview? -
i have taken plist file in take array of images... in pass, there 5 images, how retrieve these images in our view?
my code is:
- (void)viewdidload { [super viewdidload]; nsstring *path=[[nsbundle mainbundle] pathforresource:@"animalfile" oftype:@"plist"]; nsarray *animalimages=[nsarray arraywithcontentsoffile:path]; nsmutablearray *animal=[[nsmutablearray alloc]init]; for(int i=0;i<[animalimages count];i++) { uiimage *img=[animalimages objectatindex:i]; [animalphoto setimage:img]; nslog(@"print:%@",i); //nsstring *name=[animalimages objectatindex:i]; [animal addobject:[uiimage imagenamed:[nsstring stringwithformat:@"%@.png",img]]]; } }
i have taken plist file in take array of images... in pass, there 5 images, how retrieve these images in our view? my code is: | ||||
|