摘要: dispatch_source_t的作用:监听某些事件,当这些事件发生的时候,他就会把这些事件的回调的block提交到某些队列上变执行。@abstract* Creates a new dispatch source to monitor low-level system objects and a... 阅读全文
posted @ 2015-11-24 20:34 Sunny孙宁 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 1.swift中不再使用define这种方式定义宏,而是采用全局常量的方式定义。比如 let URL "www.xxx.com/1.jpg"2.swift中没有了performselector这类的方法(网上解释的说是swift不是基于消息机制的,我反正没明白为什么).所以在做相应的功能时还是使用g... 阅读全文
posted @ 2015-11-24 19:29 Sunny孙宁 阅读(151) 评论(0) 推荐(0) 编辑
摘要: //这个可以滚动到最后一行 [self.textView scrollRangeToVisible:NSMakeRange(self.textView.text.length, 1)]; self.textView.layoutManager.allowsNonContiguousLayout ... 阅读全文
posted @ 2015-11-24 09:54 Sunny孙宁 阅读(127) 评论(0) 推荐(0) 编辑