【问题标题】:Controlling the total height of the UITableView控制 UITableView 的总高度
【发布时间】:2011-12-25 05:55:18
【问题描述】:

我有一个包含 UITableView 的 UITableViewController。我尝试将 UITableViewController 的视图控制为只有 200px 高。 UITableViewController.view.frame=CGRectMake(0, 0, 320, 200),但我总是将 UITableView 设置为全高,表格并没有限制为 200 像素。 如何控制 UITableView 的总高度?

【问题讨论】:

  • UITableViewController 在屏幕上的视图在什么情况下?是窗口的rootViewControllerUINavigationController 等吗?

标签: iphone uitableview


【解决方案1】:

UITableViewControllers view 属性是 UITableView。您需要将UITableViewController 子类的超类更改为UIViewControllerI answered a question here that explains how to do this, and explains the problem in more detail.

【讨论】:

    猜你喜欢
    • 2021-08-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-24
    • 1970-01-01
    • 2012-11-14
    • 1970-01-01
    相关资源
    最近更新 更多