1

I have 2 question about popover view that:

I use popoverController to show a UIViewController with a NavigationController, in this viewController contain 2 UITableViews, Cancel and Done buttons on navigationController.

1 - When I tried to set background color or background image (by [UIColor colorWithPatternImage:[UIImage imageNamed:@"ViewBg.png"]];), but there is no effect for both tableView and viewController.view. The background color still as default color.

2 - I would like to dismiss the popView when tapping on Cancel or Done button, I tried to pass popoverController to nested viewController then call dismissPopoverAnimated: but not luck.

Does anyone know how to do this please help me! Thanks in advance!

4

1 回答 1

1

1)我猜你在 UIViewController 而不是 tableViews 上将 colorWithPatternImage 设置为 BG。[table setBackgroundColor:[UIColor clearColor]];你能在两个 UITablesViews 上都试一下吗

2)我猜你一定做了类似的事情:

in loadView:
    self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc] 
                                            initWithTitle:@"Back" 
                                                    style:UIBarButtonItemStylePlain 
                                                   target:self 
                                                   action:@selector(dismissPopoverMethod)];


- (void)dismissPopOverMethod
{
     [referencedPopOver dismissPopoverAnimated:YES]
}
于 2010-12-24T08:49:13.063 回答