Post not yet marked as solved
Post marked as unsolved with 0 replies, 374 views
In my app I have the UIPopverController and it deprecated now. So I tried to show the PopOver using the UIPopoverPresentationController.
Here I am facing some issues,
The last item is showing as a footer of the Popover window and not able to click the item
While clicking on other item it failed to navigate. How can I add the navigation.
Previous code:
SelectorViewController* sv = [[SelectorViewController alloc] initWithStyle:UITableViewStylePlain];
tsv.delegate = self;
sv.currentTopic = self.title;
popover = [[UIPopoverController alloc] initWithContentViewController:tsv];
popover.delegate = self;
popover.popoverContentSize = [sv contentSizeForViewInPopover];
if ([popover respondsToSelector:@selector(setBackgroundColor:)])
popover.backgroundColor = [UIColor whiteColor];
[sv release];
}
self.titleHeaderImage.highlighted = YES;
[popover presentPopoverFromRect:self.titleView.frame inView:self.navigationController.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
New One:
[self presentViewController:contentViewController animated: YES completion: nil];
popover.delegate = self;
// popover.popoverContentSize = [tsv preferredContentSize];
if ([popover respondsToSelector:@selector(setBackgroundColor:)])
popover.backgroundColor = [UIColor whiteColor];
/*popover = [[UIPopoverController alloc] initWithContentViewController:tsv];
popover.delegate = self;
popover.popoverContentSize = [tsv preferredContentSize];
if ([popover respondsToSelector:@selector(setBackgroundColor:)])
popover.backgroundColor = [UIColor whiteColor];*/
[ssv release];
}
self.titleHeaderImage.highlighted = YES;
[popover preferredContentSize:self.navigationController.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];