I'm attempting to display a small modal popover using the new UIPopoverPresentationController
, and while it's more or less working, the popover bubble that it is contained in is being cut off in a very weird way:
Looks like there is a piece missing from the bottom, but I can't figure out why.
Here is the code I am using to present the popover (note that the sourceView is on an inputAccessoryView):
UIViewController *popoverVC = [self.storyboard instantiateViewControllerWithIdentifier:@"profilePopover"];
popoverVC.preferredContentSize = CGSizeMake(300,120);
popoverVC.modalPresentationStyle = UIModalPresentationPopover;
self.profilePopoverController = popoverVC.popoverPresentationController;
self.profilePopoverController.delegate = self;
self.profilePopoverController.sourceView = self.chatBar.profilePictureButton;
self.profilePopoverController.sourceRect = self.chatBar.profilePictureButton.bounds;
self.profilePopoverController.permittedArrowDirections = UIPopoverArrowDirectionDown;
popoverVC.modalPresentationStyle = UIModalPresentationPopover;
[self presentViewController:popoverVC animated:YES completion:nil];