How to overlay a view on the navigation controller panel?

I have a little problem. I am trying to add popoverview to my application, but part of the popoverview is hidden by my navigation controller panel. How can I make my popoverview overlay on top of the navcontroller panel? Here is a picture of the problem: http://img593.imageshack.us/img593/4056/viewn.jpg

Here is my code I'm working with:

- (IBAction)onButtonClick:(UIButton *)button { if (self.popoverController) { [self.popoverController dismissPopoverAnimated:YES]; self.popoverController = nil; [button setTitle:@"Show Popover" forState:UIControlStateNormal]; } else { UIViewController *contentViewController = [[WEPopoverContentViewController alloc] initWithStyle:UITableViewStylePlain]; self.popoverController = [[[WEPopoverController alloc] initWithContentViewController:contentViewController] autorelease]; [self.popoverController presentPopoverFromRect:button.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES]; [contentViewController release]; [button setTitle:@"Hide Popover" forState:UIControlStateNormal]; } } 

Is there a way to do this above the navigation navigation bar?

Hope someone knows how to fix this problem, thanks in advance.

+6
objective-c iphone cocoa-touch uikit uinavigationcontroller
source share
2 answers

Could this be related to the inView parameter with the WEPopoverController presentPopoverFromRect:inView:permittedArrowDirections:animated: :? Instead of presenting it in self.view , could you represent it further in the view hierarchy (for example, in self.view.window )?

+8
source share

ohh..I got it. I changed the line in the function

 - (void)presentPopoverFromRect:(CGRect)rect inView:(UIView *)theView permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated { 

in WEPopOverController from [keyView addSubview:backgroundView]; before [theView addSubview:backgroundView];

0
source share

All Articles