I would like to present a popover from UIBarButtonItem present in UITabBarController using objectiveC in iOS9. This popover is a UITableViewController. I have coded it in the following way
- (IBAction)MenuButtonPopOverTouch:(id)sender {
LogoutTableViewController* content = [[LogoutTableViewController alloc] init];
content.modalPresentationStyle = UIModalPresentationPopover;
[self presentViewController:content animated:YES completion:nil];
UIPopoverPresentationController *PopOverPresentation = [content popoverPresentationController];
PopOverPresentation.permittedArrowDirections = UIPopoverArrowDirectionDown;
}
I think i have missed the content size of the popover but don't know how to initialize it. Any help is appreciated. Attaching a preview of my storyboard if needed anything else please let me know