I have a UITableViewController class for a simple table view(like a 2-4 cells User ID and Password,… )I represent this table view with “presentModalViewController” and the problem is the table view’s width will be fit to whole screen’s width and I want to make it smaller and be in a center of screen.I used the “viewWillAppear” and tried to set the self.tableView.frame to a CGRect like (150,150, 500, 600), now there are 2 problems 1) the x and y of new table view is alway( 0,0) the second issue is the frame of tableView has different color than background. how can I fix these?
Thanks,
Kam
Then don’t use a UITableViewController. The docs on UITableViewController clearly say this: if a table doesn’t occupy the whole screen, use your own UIViewController subclass instead.
What you want, probably, is a UIViewController whose view will occupy the whole screen, as usual – and that view contains a table view placed in the desired location.