文章标题 原创 翻译 转载 文章内容 **问题** 当在UIViewController中加入Table View,然后将其Content设置为Static Cells,xcode编译时报错提示:Static table views are only valid when embedded in UITableViewController instances。 **解决方法** 1. 将放置Table View改为放置Container View; 2. 单独拖出一个Table View Controller,在这里就可以将Table View的Content设置为Static Cells做你想做的事情; 3. 关联,在Container View上按住右键拖出一条线到Table View Controller释放鼠标右键弹出如下窗口,选择Embed,这样就大功告成了。 ![这里写图片描述](http://img.blog.csdn.net/20160216212646326) 文章类别 Python Mobile Android Java Shell Life Database Bug Windows IOS Tools Boost Node.js Mac Product Tips C/C++ Golang Javascript React Qt MQ MongoDB Design Web Linux LLM ChatGPT RAG AI 提交