ios13 UIPopoverViewController showing UITableViewController - Safe Area problems / Missing parts of table

前端 未结 3 1596
你的背包
你的背包 2020-12-19 11:20

In the same theme as this post:

iOS 13 - UIPopoverPresentationController sourceview content visible in the arrow

I have a UITableViewController instantiated

3条回答
  •  时光说笑
    2020-12-19 12:06

    It seems that you are not using the new Safe Area Layout Guides. The old method is deprecated. If you use storyboard please activate this setting in the File tab:

    In code you can use something like this:

    let guide = view.safeAreaLayoutGuide
    NSLayoutConstraint.activate([
     greenView.topAnchor.constraintEqualToSystemSpacingBelow(guide.topAnchor, multiplier: 1.0),
     guide.bottomAnchor.constraintEqualToSystemSpacingBelow(greenView.bottomAnchor, multiplier: 1.0)
    ])
    

    For more information read this: https://useyourloaf.com/blog/safe-area-layout-guide/

提交回复
热议问题