码迷,mamicode.com
首页 >  
搜索关键字:oftype    ( 200个结果
JSON (data解析) data解析为数组
获取文件路NSString*jsonPath=[[NSBundlemainBundle]pathForResource:@"Student"ofType:@"json"];2.初始化NSData对象NSData*data=[NSDatadataWithContentsOfFile:jsonPath];3.解析NSArray*arr=[dataobjectFromJSONData];
分类:Web程序   时间:2014-09-15 03:26:18    阅读次数:180
XML解析(简单)
获取解析文件路径NSString*xmlPath=[[NSBundlemainBundle]pathForResource:@"Citys"ofType:@"xml"];2.初始化xml字符串NSString*xmlStr=[NSStringstringWithContentsOfFile:xmlPathencoding:NSUTF8StringEncodingerror:nil];3.初始化一个GDataXMLDocument对象,因为解析时所有的..
分类:其他好文   时间:2014-09-15 03:23:08    阅读次数:132
AppleScript in Cocoa
NSString *path = [[NSBundle mainBundle] pathForResource:@"××××" ofType:@"scpt"];NSAppleScript *script = [[NSAppleScript alloc] initWithContentsOfURL:[...
分类:移动开发   时间:2014-09-05 17:51:51    阅读次数:225
从plist文件中读取数据
//从plist文件中读取数据-(void)readDataFromPlist{//1.先获取文件路径NSString*filePath=[[NSBundlemainBundle]pathForResource:@"Book"ofType:@"plist"];//2.根据路径初始化字典对象self.dic=[NSMutableDictionarydictionaryWithContentsOfFile:filePath];//将不可边字典变成..
分类:其他好文   时间:2014-09-05 03:25:11    阅读次数:155
NSBuddle mainBuddle
一.获取图片1. NSString *path = [[NSBuddle mainBuddle] pathForResource:@"resourceName" oftype@"resourceType"]; UIImage *image = [[UIImageimageWithContent...
分类:其他好文   时间:2014-08-31 13:06:31    阅读次数:175
iOS开发-播放本地音频(可后台播放)
//初始化音乐 //创建音乐文件路径 NSString *musicFilePath = [[NSBundle mainBundle] pathForResource:@"eyeExe" ofType:@"mp3"]; //判断文件是否存在 if ([[NSFileManager defaultManager] fileExistsAtPath:music...
分类:移动开发   时间:2014-08-23 01:08:19    阅读次数:313
C# DataTable转换成DataRow
linq中的cast()及OfType()DataTable dt=...........//获取从数据库中取出的数据(假设只有一条记录)//Cast()用来将非泛型的序列转换为泛型的序列DataRow row=dt.Rows.Cast().Single(); //OfType():用来将序列中可以...
分类:其他好文   时间:2014-08-01 04:36:41    阅读次数:158
[[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"] 找不到对应的文件解决方法
最近在使用[[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"]时,找不到其对应的文件,文件当时是通过 右键->add files to 的方式添加到工程里面的,但是使用[[NSBundle mainBundle] pathFor...
分类:其他好文   时间:2014-07-26 00:01:46    阅读次数:455
iOS使用CoreImage处理图像40中可用的滤镜名称
NSString* localPath = [[NSBundle mainBundle] pathForResource:@"1" ofType:@"jpg"]; NSURL* fileUrl = [NSURL fileURLWithPath:localPath]; CIImage* image = [CIImage imageWithContentsOfURL:fileUrl];...
分类:移动开发   时间:2014-07-18 16:31:23    阅读次数:408
音频处理
1. 背景音乐1> 添加AVFoundation.framework框架,import该框架头文件2> 加载背景音乐路径 NSString *path = [[NSBundle mainBundle] pathForResource:@”music.mp3” ofType:nil];3> 路径转化....
分类:其他好文   时间:2014-07-16 18:42:21    阅读次数:220
200条   上一页 1 ... 17 18 19 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!