1、若用方法: //-(BOOL)tableView:(UITableView *)tableView shouldHighlightRowAtIndexPath:(NSIndexPath *)indexPath{ // return NO; //} 会导致,tableview都不能相应cell的点 ...
分类:
其他好文 时间:
2016-07-25 18:03:03
阅读次数:
249
UI 下拉刷新 EGOTableViewPullRefresh - 最早的下拉刷新控件。 SVPullToRefresh - 下拉刷新控件。 MJRefresh - 仅需一行代码就可以为UITableView或者CollectionView加上下拉刷新或者上拉刷新功能。可以自定义上下拉刷新的文字说明 ...
分类:
移动开发 时间:
2016-07-25 11:42:51
阅读次数:
687
// When the user taps the status bar, the scroll view beneath the touch which is closest to the status bar will be scrolled to top, but only if its `s ...
分类:
移动开发 时间:
2016-07-24 22:32:57
阅读次数:
274
局部刷新//一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2]; [tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimatio ...
分类:
其他好文 时间:
2016-07-23 13:24:28
阅读次数:
224
支持MJRefresh刷新可在header里面添加 滚动视图 footer里面添加按钮 ...
分类:
其他好文 时间:
2016-07-23 11:55:53
阅读次数:
164
//section头部间距- (CGFloat)tableView:(UITableView )tableView heightForHeaderInSection:(NSInteger)section{ return 1;//section头部高度}//section头部视图- (UIView ) ...
分类:
其他好文 时间:
2016-07-22 14:40:27
阅读次数:
280
问题 改变UITableView的header、footer背景颜色,这是个很常见的问题。之前知道的一般做法是,通过实现tableView: viewForHeaderInSection:返回一个自定义的View,里面什么都不填,只设背景颜色。但是今天发现一个更简洁的做法。 更简洁的方法 对于iOS ...
分类:
其他好文 时间:
2016-07-20 15:04:34
阅读次数:
269
单元格选中后,打勾。再选其他,之前的勾取消,新的打勾。 代码如下(不加代码高亮了吧): - (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { NS ...
分类:
其他好文 时间:
2016-07-20 10:21:21
阅读次数:
183
例如下图:首先分析一下需求:1.根据模型的不同状态显示不同高度的cell,和cell的UI界面。 2.点击cell的取消按钮时,对应的cell首先要把取消按钮隐藏掉,然后改变cell的高度。 根据需求先解决第一个需求,需要两步 当模型数据的属性的status =@"2",不显示取消按钮;status ...
分类:
移动开发 时间:
2016-07-19 23:36:37
阅读次数:
342
貌似从ios7以后就默认不从昨天一直到右边这样子了,也不知道苹果是怎么想的,简直是颠覆世界观! 解决办法(我最喜欢的CVR模式): - (void)viewDidLayoutSubviews { if ([self.tableView respondsToSelector:@selector(set ...
分类:
其他好文 时间:
2016-07-19 22:04:52
阅读次数:
164