I'm showing a splitview within a tabbar app. In every split view, master is a UITableViewController (with Freeform size). My Custom tabBar is 1024 x 80 px (always landscape mode), and I'd like to reduce (80-49) px from master & detail that my custom tabbar is hiding from both.

I tried everything, IB, programmatically, in viewWillAppear, with initWithStyle, initWithNib, viewDidLoad, AutoResizing = NO, setbounds, setframe, contentSize... and nothing can make my UITableView to be reduced 31 px!

The UITableView has custom grouped cells, and a backgroundimage. Could be the image the problem?

Any ideas of how can I reduce the size of my UITableView? It has to be the outlet view of File's owner in that viewcontroller? I don't what else to think/do...

Many many thanks in advance, I need to finish this ASAP and that has become a real trouble.

Thanks guys!

有帮助吗?

解决方案

I ran into this problem as well. I dont think it is possible with the UITableViewController. I ended up having to create my own subclass of UIViewController with a UITableView as a subview of the viewController's main view. This way you can modify the placement and height within your viewController. One thing to note, if you go this route, make sure to send the tableview the flashScrollIndicators method so that it simulates the behavior of the UITableViewController.

Good luck

其他提示

I think you should try to set size in viewDidAppear. like i did

  • (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated];

    [self.tableView setFrame:CGRectMake(self.tableView.frame.origin.x, self.tableView.frame.origin.y, self.tableView.frame.size.width, self.tableView.frame.size.height - 50)]; }

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top