UITableViewController 之外的静态表格视图 [英] Static table view outside UITableViewController
问题描述
在新的 Xcode 更新后,我的应用程序未验证并显示此错误:
After the new Xcode update, my app doesn't validate and shows this error:
静态表格视图仅在嵌入 UITableViewController 实例时有效
static table views are only valid when embedded in UITableViewController instances
有机会轻松解决吗?
推荐答案
在同一屏幕上获得静态 UITableView 和其他控件的唯一方法是使用容器视图.按照这种方式,它完美地工作:
The only way to get a static UITableView along with other controls on the same screen is to use a Container View. Follow this way, it works perfectly:
- 将一个 ViewController 拖到故事板上.
- 将 TableViewController 拖到故事板上.
- 下一步将容器视图拖到您的 ViewController 并将其调整为您想要的大小(小于视图)-> 当您拖动容器视图时,它将创建一个 segue 和另一个视图.删除该转场并查看.
- 最后在你的容器中点击 ctrl 并拖动到你的新 TableViewContoller.选择嵌入.
- 按照您想要的方式设置 TableView 样式 -> 包括静态单元格.
祝你好运.
这里已经找到并给出了这个答案:G.Huebner -> http://web.archive.org/web/20140928102504/http://iphonedevsdk.com/forum/iphone-sdk-development/111800-static-table-view-cells-only-work-in-a-uitableviewcontroller.html
This answer was already found and given here: G.Huebner -> http://web.archive.org/web/20140928102504/http://iphonedevsdk.com/forum/iphone-sdk-development/111800-static-table-view-cells-only-work-in-a-uitableviewcontroller.html
这篇关于UITableViewController 之外的静态表格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!