Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIModalPresentationPopover - arrow direction Up, Prevent Contentview from starting from tip of the arrow

in iOS 13 it happens that the view of UIViewcontroller that is presented as model starts from the tip of the arrow. Because of it top banners in all of my popover gets cut. Can I prevent this from happening ? I want that my UIView does not start from arrow but once arrow is finished. The Red view must start from bottom of arrow

like image 365
user3519594 Avatar asked Nov 07 '22 14:11

user3519594


1 Answers

To fix this issue, I opened up my view controller's XIB, selected the top-most view, and then checked "Use Safe Area Layout Guides" under the File Inspector. Then I added Auto Layout constraints (of length 0) around that view's sole subview (a UITableView).

(I also needed to update the view controller's background colour. This changed the arrow colour back to what it was in iOS 12 and before.)

Background: https://forums.developer.apple.com/thread/122703

like image 176
Rogare Avatar answered Nov 15 '22 21:11

Rogare