欢迎访问Ningto's博客

Menu
  • 首页
  • 归档
  • 关于
  • 书签
  • 必应壁纸
  • IT聚合
  • 工具
    • 我的工具列表
    • 我的网盘
    • 必应每日壁纸API
    • Html转Markdown
    • 仙尘光标
Menu

Static table views are only valid when embedded in

最后更新 2017-06-10 11:51:54   阅读量 2964

问题 当在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,这样就大功告成了。 这里写图片描述

(转载本站文章请注明作者和出处:泞途 - ningto.com)

下一篇 – swift 网络搜索热词排行
上一篇 – swift分享到微信

  1. Mobile

toningto@outlook.com

推荐文章

Effective Python

Python的几种函数参数类型

标签云

Mac React Database Qt Node.js Javascript Product C/C++ Python Bug Tools Windows Linux Tips Design Go IOS MongoDB Shell Android Mobile Life Java Web MQ Others Boost

推广链接

【腾讯云】云产品限时秒杀,爆款1核2G云服务器,首年99元

多谢支持,用了好几年,服务很稳定支持多设备!

其他

文章RSS

Copyright © 2016 Welcome To Ningto Blog | 鄂ICP备17003086号-2