Use plist to put the dictionary array into the plist file, you can not change the code, you need to delete the data directly modify the Plist file-(nsarray*) imagedata{
if (_imagedata = = nil) {//Never initialized
Initializing data
Nsmutabledictionary *image1 = [Nsmutabledictionary dictionary];
Image1[mjiconkey] = @ "Biaoqingdi";
Image1[mjdesckey] = @ "In front of him, other god horse expression is weak!" ";
Nsmutabledictionary *image2 = [Nsmutabledictionary dictionary];
Image2[mjiconkey] = @ "Wangba";
Image2[mjdesckey] = @ "Brother Why choose Eighth";
Nsmutabledictionary *image3 = [Nsmutabledictionary dictionary];
Image3[mjiconkey] = @ "Bingli";
Image3[mjdesckey] = @ "This is also cruel";
Nsmutabledictionary *image4 = [Nsmutabledictionary dictionary];
Image4[mjiconkey] = @ "Chiniupa";
Image4[mjdesckey] = @ "Chiniupa";
Nsmutabledictionary *image5 = [Nsmutabledictionary dictionary];
Image5[mjiconkey] = @ "Danteng";
Image5[mjdesckey] = @ "Pro, can you change your screen name?" Haha ";
Nsmutabledictionary *image6 = [Nsmutabledictionary dictionary];
Image6[mjiconkey] = @ "Chiniupa";
Image6[mjdesckey] = @ "New data haha haha haha";
_imagedata = @[image1, Image2, Image3, Image4, Image5];
}
return _imagedata;} plist file Call-(nsarray*) imagedata{
if (_imagedata = = nil) {//Never initialized
Initializing data
File: Full path//NSBundle: A nsbundle represents a folder 1.NSBundle
1> a nsbundle represents a folder, with NSBundle access to the corresponding folder
2> can access any resource in the software resource bundle using Mainbundle
Installation path of the 3> emulator application/users/aplle/repository/application support/iphone simulator/7.1/applications//access to software resource bundles with Mainbundle Any of the resources in
NSBundle *bundle = [NSBundle mainbundle];
Get the full path of imagedata.plist
NSString *path = [Bundle pathforresource:@ "ImageData" oftype:@ "plist"];
_imagedata = [Nsarray Arraywithcontentsoffile:path];
}
return _imagedata;}
Dictionary--plist