摘要: 5.UITableViewCell性能优化1> 定义一个循环利用标识static NSString *ID = @"C1";2> 从缓存池中取出可循环利用的cellUITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];3> 如果缓存池中没有可循环利用的cellif (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentif 阅读全文
posted @ 2014-03-24 22:58 嘟嘟夜未央 阅读(195) 评论(0) 推荐(0) 编辑
摘要: http://magicalboy.com/kvc_and_kvo/KVC 与 KVO 是 Objective C 的关键概念,个人认为必须理解的东西,下面是实例讲解。Key-Value Coding (KVC)KVC,即是指NSKeyValueCoding,一个非正式的 Protocol,提供一种机制来间接访问对象的属性。KVO 就是基于 KVC 实现的关键技术之一。一个对象拥有某些属性。比如说,一个 Person 对象有一个 name 和一个 address 属性。以 KVC 说法,Person 对象分别有一个 value 对应他的 name 和 address 的 key。 key 只是 阅读全文
posted @ 2014-03-24 09:42 嘟嘟夜未央 阅读(212) 评论(0) 推荐(0) 编辑