iOS: 在UIViewController 中添加Static UITableView
2016-01-04 21:07
375 查看
Static table views are only valid when embedded in UITableViewController instances.
意思是说,如果 UITableView 不是在 UITableViewController 而是在 UIViewController 中的时候,是不允许将 UITableView 的 Content 属性设置为 Static Cells 的。
但是,如果想让 UIViewController 中的 UITableView 是一个 Static Cells 的怎么办呢?
方法是有的!既使用Container View在中间连接一下。
步骤如下:
先将 TableView 放到一个 UITableViewController 中,
然后在原来的 UITableViewController 加入一个 ContainerView,
最后连接 ContainerView 和 UITableViewController。
效果:
相关文章推荐
- UIViewController控制器的生命周期
- 并发队列ConcurrentLinkedQueue和阻塞队列LinkedBlockingQueue用法(转)
- NGUI ScrollView实现循环优化
- 解决Xcode7真机调试出现:XcodeYour build settings specify a provisioning profile with the UUID
- IOS-UITableView 及自定义cell
- Install Arduino IDE on Ubuntu 14.04
- UIResponder类详解
- iOS UI学习笔记(一)UIView基础
- 自定义UICollectionViewLayout(原形环绕效果)
- 自定义UICollectionViewLayout
- hibernate Query list()的缓存问题
- 自定义UICollectionViewFlowLayout
- this class is not key value coding-compliant for the key xxxxx.
- build.gradle_2.5
- queue implement
- iOS原生的搜索:UISearchController
- 控制器生命周期和 UIView
- UIView
- easyUI datagrid
- 深度剖析之 GuideBackgroundColorAnimation