自定义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
在伯乐在线上看到一个挺好玩的文章,自己也参考文章实现了一下。 效果实现如图所示: 具体实现的内容可以参考原文,参考文章:《iOS 类似美团外卖 app 两个 tableView 联动效果实现》 首先,从界面上来看,很显然是两个UITableview上下滑动的效果。而这种滑动的效果核心是左边的tabl ...
分类:
移动开发 时间:
2016-06-13 18:35:27
阅读次数:
311