//1 可读取,不可写入工程下的plist文件;// NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"OfficialDoc" ofType:@"plist"]; //2 Document 沙盒中的文件(没有文件可自...
分类:
移动开发 时间:
2014-11-09 12:32:47
阅读次数:
180
1利用NSBundle 取得json文件路径NSString *path=[[NSBundle mainBundle]pathForResource:@"help.json" ofType:nil];2把文件转成NSDataNSData *data=[NSData dataWithContentsO...
分类:
Web程序 时间:
2014-10-09 22:16:17
阅读次数:
169
1 1.取较大文件,大图 2 NSString *Path = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"plist"]; 3 NSString *str = [NSString stringWithContentsOf...
分类:
其他好文 时间:
2014-09-29 11:18:07
阅读次数:
203
1.UIImage *img = [UIImage imageNamed:@"imageName"];2.NSString *imageFilePath = [[NSBundle mainBundle] pathForResource:@"100" ofType:@"jpg"];NSData *im...
分类:
其他好文 时间:
2014-09-26 19:03:08
阅读次数:
155
===========================================Racer.csusingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Collections;
namespaceConsoleApplication4
{
[Serializable]
publicclassRacer:ICompa..
分类:
其他好文 时间:
2014-09-18 03:11:23
阅读次数:
414
获取解析文件路径NSString*xmlPath=[[NSBundlemainBundle]pathForResource:@"Person"ofType:@"xml"];2.初始化xml字符串NSString*xmlStr=[NSStringstringWithContentsOfFile:xmlPathencoding:NSUTF8StringEncodingerror:nil];3.初始化一个GDataXMLDocument对象,因为解析时所有的..
分类:
其他好文 时间:
2014-09-15 11:30:29
阅读次数:
149
先获取解析的文件路径NSString*xmlPath=[[NSBundlemainBundle]pathForResource:@"Person"ofType:@"xml"];2.根据文件路径初始化一个NSData对象NSData*data=[NSDatadataWithContentsOfFile:xmlPath];3.创建解析工具对象NSXMLParser*xmlParser=[[NSXMLParseralloc]initWithData:da..
分类:
其他好文 时间:
2014-09-15 03:27:58
阅读次数:
131
获取解析文件路径NSString*xmlPath=[[NSBundlemainBundle]pathForResource:@"Person"ofType:@"xml"];2.初始化xml字符串NSString*xmlStr=[NSStringstringWithContentsOfFile:xmlPathencoding:NSUTF8StringEncodingerror:nil];3.初始化一个GDataXMLDocument对象,因为解析时所有的..
分类:
其他好文 时间:
2014-09-15 03:27:28
阅读次数:
149
获取文件路径NSString*jsonPath=[[NSBundlemainBundle]pathForResource:@"Student"ofType:@"json"];2.初始化NSData对象NSData*data=[NSDatadataWithContentsOfFile:jsonPath];3.解析(NSJSONReadingMutableContainers)可变的一个容器//NSJSONReadingMutableLeaves//NSJSONReadin..
分类:
Web程序 时间:
2014-09-15 03:27:18
阅读次数:
171
1.获取文件路径NSString*jsonPath=[[NSBundlemainBundle]pathForResource:@"Student"ofType:@"json"];2.将文件内容转化为字符串NSString*jsonStr=[NSStringstringWithContentsOfFile:jsonPathencoding:NSUTF8StringEncodingerror:nil];3.解析,通过JSON将文件字符串转化为数组.N..
分类:
Web程序 时间:
2014-09-15 03:27:08
阅读次数:
235