UICollectionView 和 UICollectionViewController 类是iOS6 新引进的API,用于展示集合视图,布局更加灵活,可实现多列布局,用法类似于UITableView 和 UITableViewController 类。 使用UICollectionView 必须 ...
分类:
移动开发 时间:
2016-06-20 18:30:27
阅读次数:
201
自定义cell,button,tableView UITableView *cell = (UITableView *)[[self.btn superview] superview] ; NSIndexPath *index = [self.tableView indexPathForCell:c ...
分类:
其他好文 时间:
2016-06-20 18:25:53
阅读次数:
122
UITableView的强大更多程度上来自于可以任意自定义UITableViewCell单元格。 通常,UITableView中的Cell是 动态的,在使用过程中,会创建一个Cell池,根据每个cell的高度(即tableView:heightForRowAtIndexPath:返回 值),以及屏幕 ...
分类:
其他好文 时间:
2016-06-20 14:12:33
阅读次数:
366
iOS系统自带的UITableView,当数据分为多个section的时候,在UITableView滑动的过程中,默认section header是固定在顶部的,滑动到下一个section的时候,下一个section header把上一个section header顶出屏幕外。典型的应用就是通讯录。 ...
分类:
其他好文 时间:
2016-06-19 18:31:11
阅读次数:
129
iOS开发UI篇—UITableviewcell的性能问题 一、UITableviewcell的一些介绍 UITableView的每一行都是一个UITableViewCell,通过dataSource的 tableView:cellForRowAtIndexPath:方法来初始化每?行 UITabl ...
分类:
其他好文 时间:
2016-06-19 18:19:06
阅读次数:
134
注意要 -- 注册 xib 2.从xib 创建tableViewCell 可以在创建tableview的时候,直接 注册nib 这样你在- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSI ...
分类:
其他好文 时间:
2016-06-17 19:32:56
阅读次数:
319
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ DLJobLogTableViewCell *cell = [tableView deque ...
分类:
其他好文 时间:
2016-06-15 12:17:33
阅读次数:
127
一. 目的: 实现UITableViewCell上按钮点击事件可以进行页面跳转. 二. 实现方法: 1. 用协议的方式的实现. 2. 需要自定义UITableViewCell. 三. 代码部分. cell.h中 cell.m中 controller.m中 ...
分类:
移动开发 时间:
2016-06-14 23:40:03
阅读次数:
670
影响 UITableView 滚动的流畅性的原因 1、在代理方法中做了过多的计算占用了 UI 线程的时间 2、Cell里的图片吃GPU(在tableView:cellForRowAtIndexPath:中) 3、Cell 中 view 的组织复杂 关于第一点,首先要明白 tableview 的代理( ...
分类:
其他好文 时间:
2016-06-14 19:15:30
阅读次数:
241
(原本取至D了个L微信公众号) UITableView 详解 一、建立 UITableView DataTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 420)];[DataTable setDelegate:self ...
分类:
其他好文 时间:
2016-06-13 21:48:00
阅读次数:
156