1

I have a UITableViewController which contains a UITableView. I try to control the UITableViewController's view to be only 200px tall. UITableViewController.view.frame=CGRectMake(0, 0, 320, 200), but I always getting the UITableView to be full height, the table didn't contrainted to 200 px. How do I control the total height of the UITableView?

lilzz
  • 5,243
  • 14
  • 59
  • 87
  • 1
    In what context is the UITableViewController’s view on screen? Is it the window’s `rootViewController`, in a `UINavigationController`, etc? – Ben Cochran Dec 25 '11 at 06:01

1 Answers1

2

A UITableViewControllers view property is a UITableView. You need to change your UITableViewController subclass's superclass to be UIViewController. I answered a question here that explains how to do this, and explains the problem in more detail.

Community
  • 1
  • 1
NJones
  • 27,139
  • 8
  • 70
  • 88