![enter image description here](https://i.stack.imgur.com/x7yOH.png)
![enter image description here](https://i.stack.imgur.com/L0aMK.jpg)
![enter image description here](https://i.stack.imgur.com/GySQD.jpg)
Как видно На изображении, когда root-вид поднимается до вершины стрелки. Верх кнопки обрезается.
Как это исправить?
- (IBAction)actionAddChatBtn:(id)sender {
UIButton *view = (UIButton *)sender;
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
ChatTypePopupViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"choose_chattype_popup"];
vc.chatTypePopupDelegate = self;
[self presentPopOverWithViewController:vc sourceView:view];
}
- (void)presentPopOverWithViewController:(UIViewController *)viewController sourceView:(UIView *)sourceView {
viewController.modalPresentationStyle = UIModalPresentationPopover;
viewController.preferredContentSize = viewController.view.bounds.size;
UIPopoverPresentationController *presentationController = viewController.popoverPresentationController;
presentationController.delegate = self;
presentationController.permittedArrowDirections = UIPopoverArrowDirectionUp;
presentationController.sourceView = sourceView;
presentationController.sourceRect = sourceView.bounds;
[self presentViewController:viewController animated:YES completion:NULL];
}