Domanda

I use the following code:

PBComboBoxDetailsTableViewController *vc = (PBComboBoxDetailsTableViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"PBDetailListViewController"];
NSString *path = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"plist"];
NSDictionary *settingsDict = [NSDictionary dictionaryWithContentsOfFile:path];
vc.dataSource = settingsDict[@"Frequency"];
[self presentViewController:vc animated:YES completion:nil];

And UITableView appears under the status bar and of course I cannot set up its frame manually because it appears as a top view controller and position option is disabled. Are there ways to solve this problem except of inserting this table into viewcontroller?

È stato utile?

Soluzione

If your view controller is of type UITableViewController the view property of this controller, i.e. the top view in the hierarchy is the table view.

If you want your table view to fill any other space than the entire view (screen) you will have to use a UIViewController and add tableView, as well as its delegate and datasource methods manually.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top