1.nsbundle
1 > a NSBundle represents a folder , Use NSBundle access to the corresponding folder
2 > Use Mainbundle can access any resource in the software resource bundle
3 > installation path of the emulator application /users/aplle/ repository /application support/iphone simulator/7.1 /applications
4> implement lazy loading load only once
@property (nonatomic, Strong) Nsarray *imagedata;-(Nsarray *) imagedata{ if (_imagedata = = nil) {//never initialized //initialized number According to//File: Full path //NSBundle: A nsbundle represents a folder //use Mainbundle to access any resource in the software resource bundle nsbundle *bundle = [ NSBundle Mainbundle]; get Imagedata.plist's full path nsstring *path = [Bundle pathforresource:@ "ImageData" oftype:@ "plist"]; _imagedata = [Nsarray Arraywithcontentsoffile:path]; } return _imagedata;}
2.based on poor extensibilityplistUse of files
* Create plist
* Let plist load only once
Use of 3.ios NSBundle and plist