
UITableView
文章平均质量分 64
凤岭
啊啊
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
iOS tableview的section添加圆角
// tableView 为 group类型。 UITableView * tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStyleGrouped]; // 在代理方法中修改cell的圆角 - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSInd原创 2021-08-27 09:37:02 · 1075 阅读 · 0 评论 -
cell编辑功能,使用cell左侧自带勾选标记
要点: 在自定义cell类中重新 刷新方法。分别设置选中时图标和未选中时图标。代码如下: (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; for (UIView *v1 in self.subviews) { NSLog(@“c...原创 2020-04-02 11:57:20 · 543 阅读 · 0 评论 -
tableView 自定义分隔线
// 分割线 View UIView *lineLabel = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableviewWith, 0.5)]; lineLabel.backgroundColor = HEADER_LINE_COLOR; [headview addSubv原创 2017-04-24 10:41:19 · 341 阅读 · 0 评论 -
ios 修改 cell.imageview 大小
cell 的imageView的大小是跟图片的大小有关的,所有可以采用改变图片的大小的方法来改变imageview的大小。 cell imageview的属性是readonly 所以不可变更 可以用这种方法改 // 设置 cell 的 imageView 的大小位置 - (void) setCell:(UITableViewCell *)cell原创 2017-04-24 10:21:08 · 507 阅读 · 0 评论 -
UITableView 局部刷新
//局部section刷新 NSIndexSet * nd=[[NSIndexSet alloc]initWithIndex:1];//刷新第二个section [tview reloadSections:nd withRowAnimation:UITableViewRowAnimationAutomatic]; //局部cell刷新 www.2cto.原创 2017-04-24 10:35:38 · 370 阅读 · 0 评论 -
不让tableview的每个section的headerview随tableview一起滚动
//去掉UItableview headerview黏性 - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if (scrollView == self.tableView) { CGFloat YOUR_HEIGHT = 20.0f;原创 2017-04-24 10:37:20 · 380 阅读 · 0 评论 -
tableview 自定义cell左边图片
static NSString *cellIdentifier = @"cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; // Configure the cell... if([self.dataArray count] == 0) { return c原创 2017-04-24 10:39:16 · 670 阅读 · 0 评论 -
UITableViewCell 分割线的属性 cell两端置顶 缩进 颜色
// // ViewController.m // TabbLeView横线 // #import "ViewController.h" @interface ViewController () UITableViewDelegate, UITableViewDataSource > @prop转载 2017-04-25 09:46:47 · 424 阅读 · 0 评论