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?
Asked
Active
Viewed 1,170 times
1
-
1In 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 Answers
2
A UITableViewController
s 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.