2014年8月15日

NSDictionary读取boolean值数据

摘要: Object-c代码NSDictionary* json = [html JSONValue];bool bol = [[json objectForKey:@"state"] boolValue];switch (bol) { case 0: //false break; case 1: //tr... 阅读全文

posted @ 2014-08-15 19:09 &大飞 阅读(918) 评论(0) 推荐(0)

NSString字符串相加 相连接

摘要: NSString字符串相加 相连接2012-08-20 10:48:05|分类:iphone/ipad|字号订阅NSString* string; // 结果字符串NSString* string1, string2; //已存在的字符串1. string = [NSString initWithF... 阅读全文

posted @ 2014-08-15 19:08 &大飞 阅读(175) 评论(0) 推荐(0)

Objectc-c方法如何传递多个参数?

摘要: Object-c的一个方法可以包含多个参数,除了第一个参数外,后面的所有参数都要写名字,这一点和其他的语言有很大的不同。多个参数的写法(方法的数据类型) 函数名: (参数1数据类型) 参数1的数值的名字 参数2的名字: (参数2数据类型) 参数2值的名字 …. ;举个例子,一个方法的定义:-(voi... 阅读全文

posted @ 2014-08-15 15:34 &大飞 阅读(565) 评论(0) 推荐(0)

获取iOS各种文件路径

摘要: //得到Document目录:NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);NSString *documentsDirectory = [path... 阅读全文

posted @ 2014-08-15 15:11 &大飞 阅读(142) 评论(0) 推荐(0)

导航