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.
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
UITableViewController
. Just a UITableView
in the root view. The constraints were set between the table view and the surrounding safe area ("Align Trailing to: Safe Area," "Align Top to: Safe Area," etc.) –
Bashee I don't know why they changed this behavior, it can be a pita to deal with it if you are not using xibs. I couldn't find anything in the docs about it.
Use the safe areas to adjust the position of your view. You can both try to extend the size of that red area, or skip the arrow completely. In this particular case you can use safeAreaInsets.top
if the arrow is going to be on the top always.
I wonder if your contentView contains UIScrollView. If yes, please add alwaysBounceVertical = YES
to your scrollView. It works in my case.
© 2022 - 2024 — McMap. All rights reserved.