07 2015 档案

摘要:关于 - headerViewForSection returns nil问题 在通过 -tableView: viewForHeaderAtSection: 设置headerView,然后再去通过headerViewForSection取的时候 ,发现返回结果为nil; 究其原因... 阅读全文
posted @ 2015-07-24 16:48 沙影无痕 阅读(451) 评论(0) 推荐(0)
摘要:dispatch_async 避免数据处理等耗时,采用异步多线程执行:dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // 耗时的数据处理等 dispat... 阅读全文
posted @ 2015-07-22 17:15 沙影无痕 阅读(491) 评论(0) 推荐(0)
摘要:首先我们定义变量: NSTimeInterval totalDration;@property (strong, nonatomic) AVPlayer *player;@property (retain, nonatomic) AVPlayerItem *playerItem... 阅读全文
posted @ 2015-07-21 10:59 沙影无痕 阅读(11299) 评论(0) 推荐(0)
摘要:C++中引入了关键字inline,我们称之为内联函数; 内联函数的作用体现在对于频繁调用的小函数上,太长代码的函数显然不适合声明为内联函数,这无疑会加大内存的消耗。 eg:#include //define inline inline bool isValueValid(int ... 阅读全文
posted @ 2015-07-13 09:10 沙影无痕 阅读(558) 评论(0) 推荐(0)
摘要:关于NSTimer的几点说明 (1)NSTimer 会对它的方法接收者(target)retain; (2)NSTimer不是一种实时的机制,可能会存在延时,而延迟多少取决于当前线程; (3)NSTimer添加到Runloop中才会生效。NSTimer其实也是一种资源,所有的sour... 阅读全文
posted @ 2015-07-08 09:49 沙影无痕 阅读(151) 评论(0) 推荐(0)
摘要:Build Active Architecture Only 这个属性, 设置为NO时,编译支持的多个版本,如: armv7,arm64 设置为YES时,编译出的版本是可以向下进行兼容的,用iPhone4编译出来的是armv7版本的,iPhone5(armv7s)也可以运行,但是ar... 阅读全文
posted @ 2015-07-01 11:59 沙影无痕 阅读(341) 评论(0) 推荐(0)