摘要: 测试环境:iPhone 5s iOS7.1首先添加框架AVFoundation.framework,然后导入自定义类CMCaptureViewController.h、CMCaptureViewController.m,以及用到的图片资源:line@2x.png、pick_bg@2x.png。用的时... 阅读全文
posted @ 2014-10-10 19:40 ★行云流水★ 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 首先,创建一个UIView对象有两种方法:IB方式和编码方式。1、IB(Interface Builder)方式:即从nib文件中加载视图,此时会调用该view对象的initWithCoder方法,接着调用awakeFromNib方法CMButton *button = [[[NSBundle ... 阅读全文
posted @ 2014-09-12 17:15 ★行云流水★ 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 1、UIApplicationExitsOnSuspend(Bool型,默认为关 ),启用这个键时,当用户单击Home按钮时,iOS将终止应用程序,并从内存中清除,而不是转移到后台。在Info.plist中表示为:2、UIStatusBarHidden(Bool型,默认为关 ),启用这个键时,应... 阅读全文
posted @ 2014-09-05 10:12 ★行云流水★ 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 NSDate *now = [NSDate date]; 2 NSCalendar *calendar = [NSCalendar currentCalendar]; 3 4 //获取年、月、日、时、分、秒等组件 5 NSDateComponen... 阅读全文
posted @ 2014-07-20 07:52 ★行云流水★ 阅读(126) 评论(0) 推荐(0) 编辑
摘要: CorePlot是一个开源的数据报表框架库,且是个静态库(iphone协议不允许连接动态库)。因此在项目中使用CorePlot要进行必要的一些设置以使Xcode正确链接这个静态库。1、下载core-plot源码包:https://github.com/core-plot/core-plot2、解... 阅读全文
posted @ 2014-07-11 14:34 ★行云流水★ 阅读(298) 评论(1) 推荐(0) 编辑
摘要: NSPredicate类,指定过滤器的条件 1 // 设置谓词条件 2 NSPredicate *predicate = [NSPredicate predicateWithFormat:@"age 'bruse' && age < %d", 30];22 NSArray *array4 = [a... 阅读全文
posted @ 2014-06-05 19:35 ★行云流水★ 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1 //以separator为节点分割字符串2 - (NSArray *)componentsSeparatedByString:(NSString *)separator;3 4 //NSString转换为const char *5 NSString *str = @"abc";6 const c... 阅读全文
posted @ 2014-06-02 19:44 ★行云流水★ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 下载ASIHTTPRequest框架,解压后,把加到工程中,然后还需要添加一些支持的类库和框架:(TARGETS->Build Phases->Link Binary With Libraries)ASIHTTPRequest不支持ARC内存管理,因此如果我们采用了ARC,应该设置一下编译参数"-f... 阅读全文
posted @ 2014-06-01 10:43 ★行云流水★ 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1、警告:warning: no rule to process file '/Users/lcm/Desktop/测试/ASIHttpRequest/ASIHttpRequest/ASINetworkQueue.h' of type sourcecode.c.h for architecture ... 阅读全文
posted @ 2014-05-26 18:29 ★行云流水★ 阅读(121) 评论(0) 推荐(0) 编辑
摘要: getopt(分析命令行参数)相关函数表头文件 #include extern char *optarg; //选项的参数指针 extern int optind, //下一次调用getopt的时,从optind存储的位置处重新开始检查选项。 extern int opterr, //当opterr=0时,getopt不向stderr输出错误信息。 extern int optopt; //当命令行选项字符不包括在optstring中或者选项缺少必要的参数时,该选项存储在optopt 中,getopt返回'?’、定义函数 int getopt(int argc,char * cons. 阅读全文
posted @ 2014-03-07 10:25 ★行云流水★ 阅读(1006) 评论(0) 推荐(0) 编辑