1、实现tableView的代理方法 2、cell添加左划按钮 ...
分类:
其他好文 时间:
2016-08-24 11:08:56
阅读次数:
102
uicollectionview最大的特点就是它的数据源方法(cell for indexpath)里只需要从缓存池中重用即可,即调用deque...for indexPath..(这里有个坑,注意tableview里重用时并不需要后面红色的indexpath部分,如果你在tableview里用这个 ...
分类:
其他好文 时间:
2016-08-24 00:57:22
阅读次数:
179
主要实现这个方法就好了 -(NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{ return @[ [U ...
分类:
移动开发 时间:
2016-08-23 13:19:09
阅读次数:
221
iOS开发基础知识--碎片22 1:设置有间距的表格行(UITableViewStyleGrouped) 1.设置section的数目,即是你有多少个cell - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { re ...
分类:
移动开发 时间:
2016-08-22 21:30:39
阅读次数:
250
1.设置右侧索引字体颜色 self.tabView.sectionIndexColor = [UIColor blackColor]; 2.设置右侧索引背景色 self.cityTabView.sectionIndexBackgroundColor =[UIColor blackColor]; // ...
分类:
移动开发 时间:
2016-08-20 17:54:56
阅读次数:
688
1.直接把tableView设置成self.tableView.separatorStyle =UITableViewCellSeparatorStyleNone.然后自定义cell那里自己加一个view,高度为1,颜色自己设置。 2.添加这两个方法 -(void)viewDidLayoutSubv ...
分类:
移动开发 时间:
2016-08-20 16:12:23
阅读次数:
182
//显示有多少组 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView //显示每组的头部 -(UIView*)tableView:(UITableView *)tableView viewForHeaderInSecti ...
分类:
移动开发 时间:
2016-08-20 13:15:18
阅读次数:
241
1.去掉tableView的分割线self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 2.点击tableView时去掉灰色效果[self.tableView deselectRowAtIndexPath:indexPa ...
分类:
移动开发 时间:
2016-08-20 13:01:59
阅读次数:
189
self.automaticallyAdjustsScrollViewInsets = NO; //在当前VC内修改这个属性就可以解决这个问题了。 当前以TableView为主View的ViewController,在设置TableView的Inset的时候,会遇到一个问题。(我就被这问题给困住了蛮 ...
分类:
移动开发 时间:
2016-08-20 11:30:34
阅读次数:
170
当tableView.scrollsToTop=YES不管用时,可以使用以下方法实现点击状态栏使tableView滚动到顶部。 ...
分类:
移动开发 时间:
2016-08-20 00:09:18
阅读次数:
224