首页 > 其他 > 详细

使用containerView在UIViewController实现staticCell的使用

时间:2015-04-21 00:26:36      阅读:199      评论:0      收藏:0      [点我收藏+]
今天在做项目在UIViewController中的UItableview使用staticCell,刚在storyboard中的tableView设置完staticCell,就出现 Static table views are only valid when embedded in UITableViewController instances警告。是说staticCell只能在UItableviewController使用。那么在UIViewController中还可以使用staticCell吗?答案是肯定的。这要借助container来实现。container就是一个容器,可以放ViewController。我们在storyboard拖一个container在UIViewController中,然后在拖一个UItableviewController在storyboard中。然后从containerView拖一segue选择embed。这样就能实现在UIViewController实现staticCell的使用。在如下图技术分享

使用containerView在UIViewController实现staticCell的使用

原文:http://blog.csdn.net/lcxihonglei/article/details/45157455

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!