views:

54

answers:

2

how do i set the size of tableview that is inherrited from UITableViewController like this

@interface myTableViewController : UITableViewController  {    
............
............
}
+1  A: 

If you're doing this programmatically and not from a nib, then you can change the table's size using something like this in your .m file:

CGRect tableFrame = self.tableView.frame;
tableFrame.size = CGSizeMake(320, 480); //(x, y) x = width and y = height
self.tableView.frame = tableFrame; 

If you're doing it with Interface Builder, just change the size in the Inspector under the size tab.

Calvin L
sorry friend it's also not working. table size remain unchanged. could u give me another suggetion.
chandra
A: 

Inheritance has hardly anything to do with what you want here. You can set the size of the table view directly in the xib in the inspector(command + i) Size tab. Or you can set the size programmatically:

 self.tableView.frame = CGRectMake(0, 0, 200, 200);
lukya
i tried this,but table size remain unchanged.any other solution plz.
chandra