Showing Master/Detail UITableView inside UIPopOverController
- by tilomitra
I have a UIPopOverController that shows a UIViewController with a UITableview in its view. The cells in the table have a detailedView, but whenever that view gets pushed, the PopOverController increases in size, and I am left with all this white space inside it.
Question is this: Can anyone show me how I can have a Master/Detail UITableview show inside a PopOverController whilst preserving its dimensions?
Some of my code if it helps you:
//Creating the PopOver with the UIViewController
addTaskViewController = [[AddTaskViewController alloc] initWithNibName:@"AddTaskViewController" bundle:nil];
UINavigationController *addTaskNavController = [[UINavigationController alloc] initWithRootViewController:addTaskViewController];
UIPopoverController *addTaskPopOver = [[UIPopoverController alloc] initWithContentViewController:addTaskNavController];
self.addTaskPopOverController = addTaskPopOver;
addTaskPopOverController.delegate = self;
//...neccessary releases...
//Showing the popover when a button is pressed
- (void) addTasksButtonPressed:(id)sender {
//Display the Popover containing a view from AddTaskViewController
[self.addTaskPopOverController setPopoverContentSize:CGSizeMake(400, 700)];
[addTaskPopOverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
}