Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is an UITableView resizable? Can I assign a different frame?

Is UITableView resizable ? Can I assign a different frame ?

I'm trying this line in a UITableViewController but it doesn't work (on iPhone):

self.tableView.frame = CGRectMake(0, 0, 300, 200);

thanks

like image 224
aneuryzm Avatar asked Nov 27 '22 06:11

aneuryzm


1 Answers

Not in a UITableViewController, because in a UITableViewController, self.view == self.tableView.

Try using a UIViewController, implementing the UITableViewDataSource and UITableViewDelegate protocols as necessary.

like image 79
Can Berk Güder Avatar answered Feb 24 '23 12:02

Can Berk Güder