I've sorta got a little problem. I'm trying to add a popoverview to my app but part of the popoverview get's hidden by my navigation controller bar. How can I make my popoverview overlay over top of the navcontrollerbar? Here's an image of the problem: http://img593.imageshack.us/img593/4056/viewn.jpg
Here's 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 anyway to make this popover above the navigation controller bar?
Hopefully someone knows how to fix this problem, Thanks in advance.
Could this be related to the inView parameter to WEPopoverController presentPopoverFromRect:inView:permittedArrowDirections:animated:
? Instead of presenting it in self.view
could you present further up in the view hierarchy (like in self.view.window
)?
ohh..I got it..I changed line in function
- (void)presentPopoverFromRect:(CGRect)rect
inView:(UIView *)theView
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections
animated:(BOOL)animated {
in WEPopOverController from [keyView addSubview:backgroundView];
to [theView addSubview:backgroundView];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.