bottom layout deprecated since ios 11.0

后端 未结 3 726
有刺的猬
有刺的猬 2021-02-05 06:10

What can I do to fix Bottom layout is deprecated iOS 11, I am using Xcode 9 beta 2.

3条回答
  •  遇见更好的自我
    2021-02-05 07:10

    According to this, in iOS 11, IB replaces bottomLayoutGuide by safeAreaLayoutGuide.

    Interface Builder uses UIView.safeAreaLayoutGuide as a replacement for the deprecated Top and Bottom layout guides in UIViewController. To use the new safe area, select Safe Area Layout Guides in the File inspector for the view controller, and then add constraints between your content and the new safe area anchors. This prevents your content from being obscured by top and bottom bars, and by the overscan region on tvOS. Constraints to the safe area are converted to Top and Bottom when deploying to earlier versions of iOS. (29323293)

提交回复
热议问题