UITableViewController外部的静态表视图 [英] Static table view outside UITableViewController

查看:109
本文介绍了UITableViewController外部的静态表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新的xCode更新后,我的应用程式无法验证并显示此错误:


静态表视图仅在嵌入in UITableViewController instances



任何机会可以轻松解决?

解决方案

在同一屏幕上获取静态UITableView和其他控件的唯一方法是使用容器视图。


  1. 将一个ViewController拖放到您的故事板上。


  2. 下一步将一个Container视图拖动到您的ViewController,并将其大小设置为所需的大小(小于视图) - >当您拖动容器视图时,它将创建一个segue和另一种观点。删除该segue并查看。

  3. 然后最终ctrl单击您的容器并拖动到新的TableViewContoller。



  4. 祝你好运。



    这个答案已经找到,并在这里给出:G.Huebner - > http://iphonedevsdk.com/forum/iphone-sdk-development/111800-static-table-view- cells-only-work-in-a-uitableviewcontroller.html


    after the new xCode update, my app doesn't validate and shows this error:

    static table views are only valid when embedded in UITableViewController instances

    Any chances to solve easily?

    解决方案

    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:

    1. Drag a ViewController onto your storyboard.
    2. Drag a TableViewController onto your storyboard.
    3. Next Drag a Container view to your ViewController and size it about the size you want (smaller than the view) -> when you drag the container view it will create a segue and another view. Remove that segue and view.
    4. Then finally ctrl click in your container and drag to your new TableViewContoller. Select Embed.
    5. Style your TableView the way you want -> including static cells.

    Good luck.

    This answer was already found and given here: G.Huebner -> http://iphonedevsdk.com/forum/iphone-sdk-development/111800-static-table-view-cells-only-work-in-a-uitableviewcontroller.html

    这篇关于UITableViewController外部的静态表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆