Showing Master/Detail UITableView inside UIPopOverController

Posted by tilomitra on Stack Overflow See other posts from Stack Overflow or by tilomitra
Published on 2010-04-14T00:24:19Z Indexed on 2010/04/14 0:43 UTC
Read the original article Hit count: 1041

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];
}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiviewcontroller