一个静态UITabelView的解决方案----CTStaticTableView
来源:互联网 发布:excel不规则数据分列 编辑:程序博客网 时间:2024/05/29 13:26
CTStaticTableView
这是一个用代码封装静态TableView的方式。
你可以用xib初始化CTStaticTableView,也可以用代码:
self.tableView = [[CTStaticTableView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; [self.view addSubview:self.tableView];
然后可以合成你的static table view cell
需要两个参数:一个是TableViewCell对象,一个是他的高度。
CTStaticTableViewCell *fristStaticCell = [CTStaticTableViewCell staticTableViewCellWithCell:[DemoTableViewFristCell fristCell] height:50]; CTStaticTableViewCell *secendStaticCell = [CTStaticTableViewCell staticTableViewCellWithCell:[DemoTableViewSecendCell secendCell] height:80];
拼起来吧
[self.tableView showStaticCells:@[fristStaticCell, secendStaticCell]]; //或者 [self.tableView showStaticCells:@[fristStaticCell, secendStaticCell] withDidSelectRowDelegate:self]; //或者 [self.tableView showStaticCells:@[fristStaticCell, secendStaticCell] withDidSelectRowBlock:^(NSIndexPath *indexPath) { NSLog(@"taptaptap"); }];
没了,请看demo代码。
https://github.com/chentoo/CTStaticTableView
0 0
- 一个静态UITabelView的解决方案----CTStaticTableView
- 静态UITabelView
- 写一个简单的自定义UITabelView
- UITabelView的自适应布局
- UITabelView
- UITabelView
- 关于UITabelView的右侧Table
- UItabelView-实例化一个表格视图
- 非常全面的UITabelView学习笔记
- UITabelView中 cell 的复用机制
- iOS中UITabelView的层级结构
- UITabelView的编辑方式以及其他应用
- DZNEmptyDataSet UItabelView空数据 背景图的实现
- 如何滚动到UITabelView的底部(bottom)
- UITableViewStyleGrouped类型的UITabelView使用技巧
- 生成静态页的解决方案
- LoadRunner的一个解决方案
- LoadRunner的一个解决方案
- C++ - 动态申请数组空间
- java下的大型网站对图片的下载,存放,及压缩管理
- 自定义dialog的使用
- uva12169(扩展欧几里得)
- String与StringBuffer的区别
- 一个静态UITabelView的解决方案----CTStaticTableView
- 微信JS接口 分享到朋友圈 分享给朋友 分享到QQ 拍照或从手机相册中选图 识别音频并返回识别结果 使用微信内置地图查看位置
- Python模块学习 ---- datetime
- UI基础—UITableView
- java 利用反射机制,获取实体所有属性和方法,并对属性赋值
- NSNotificationCenter 的使用详解
- cocos node sceen
- 大数据
- 1037. Magic Coupon (25)