上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: 阅读全文
posted @ 2016-10-29 01:00 PengYunjing 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 1、包含运行时头文件 <objc/runtime.h> 2、获取某个类的成员变量或者属性; 3、获取成员函数 阅读全文
posted @ 2016-10-28 23:11 PengYunjing 阅读(523) 评论(0) 推荐(0) 编辑
摘要: NSString *str; // 使用stringWithFormat生成一格式化字符串 str = [NSString stringWithFormat:@"This is %@","John"]; NSLog(@"str--->%@",str); // 字符串长度length; NSLog(@"The length of this string is %@",[str length]); ... 阅读全文
posted @ 2016-10-26 15:52 PengYunjing 阅读(349) 评论(0) 推荐(0) 编辑
摘要: // 从路径中获得完整的文件名(带后缀) exestr = [filePath lastPathComponent]; NSLog(@"%@",exestr); // 获得文件名(不带后缀) exestr = [exestr stringByDeletingPathExtension]; NSLog(@"%@",exestr); //... 阅读全文
posted @ 2016-10-26 11:14 PengYunjing 阅读(763) 评论(0) 推荐(0) 编辑
摘要: // 当Documents内文件发生改变时,启动计时器,每秒计算一次大小,当大小不发生改变时说明传输完毕,就开始刷新。 @property (nonatomic, strong) NSTimer *timer; // 原Documents内文件大小 @property (nonatomic, assign) NSInteger filesSize; /... 阅读全文
posted @ 2016-10-25 23:51 PengYunjing 阅读(274) 评论(0) 推荐(0) 编辑
摘要: -(NSInteger)getSizeOfFilePath:(NSString *)filePath{ /** 定义记录大小 */ NSInteger totalSize = 0; /** 创建一个文件管理对象 */ NSFileManager * manager = [NSFileManager defaultManager]; /**获取文件下的所有路... 阅读全文
posted @ 2016-10-25 23:42 PengYunjing 阅读(484) 评论(0) 推荐(0) 编辑
摘要: 旧方法:在iOS7.0以后过期了,但是还是可以用。 新方法:要导入头文件 :#import <AVFoundation/AVFoundation.h> 阅读全文
posted @ 2016-10-25 15:33 PengYunjing 阅读(872) 评论(0) 推荐(0) 编辑
摘要: //枚举定义图片类型 //定义方法 //调用 阅读全文
posted @ 2016-10-24 17:17 PengYunjing 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 在Info.plist文件中添加UIFileSharingEnabled键,并将键值设置为YES。将您希望共享的文件放在应用程序的Documents目录。 阅读全文
posted @ 2016-10-24 11:54 PengYunjing 阅读(203) 评论(0) 推荐(0) 编辑
摘要: iOS 10 开始对隐私权限更加严格,如果你不设置就会直接崩溃,现在很多遇到崩溃问题了,一般解决办法都是在info.plist文件添加对应的Key-Value就可以了。 以上Value值,圈出的红线部分的文字是展示给用户看的,必须添加。 阅读全文
posted @ 2016-10-23 19:42 PengYunjing 阅读(502) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页