The lower layout is deprecated since ios 11.0

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

enter image description here

+5
source share
3 answers

Just check the "Use safe layout areas" button in the IB File Inspector.

use safe area marking guides

+7
source

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

The Builder interface uses UIView.safeAreaLayoutGuide as a replacement for the legacy Top and Bottom layout guides in the UIViewController. To use the new safe area, select the "Planning Guide for Safe Space" in the file inspector for the view controller, and then add restrictions between your content and the new safe zones. This prevents your content. from shading with the upper and lower bars and the skipping area on tvOS. Security zone restrictions translate to the top and bottom when deployed to earlier versions of iOS. (29323293)

+1
source

Use the Safe Zone Layout (Safe Zone Planning Guide ) .
Safe space configuration has replaced the top layout and the bottom layout in iOS 11. The layout guide represents a part of your view that is not classified by bars and other content. In iOS 11, Apple rejects the top and bottom layout guides and replaces them with one safe area planning guide.

When a view is visible on the screen, this guide reflects a part of the view that is not covered by other content. The safe viewing area reflects the area covered by navigation bars, tabs, toolbars, and other ancestors that hide the view controller view. (In tvOS, the safe area includes a screen frame, as defined by the overscanCompensationInsets UIScreen property.) It also covers any additional space defined by the additionalSafeAreaInsets view manager property. If the view is not currently installed in the view hierarchy or is not yet displayed on the screen, the layout guide always matches the edges of the view.

To represent the root controller of the controller, the safe area in this property represents all of the hidden content of the view controller and any additional inserts that you specify. For other views in the view hierarchy, the safe area reflects only the part of this view that is hidden. For example, if the view is completely in the safe area of ​​its root view controller view, the inserts of this edge are set to 0.

According to Apple, Xcode 9 Release Notes The Interface Builder uses the UIView.safeAreaLayoutGuide as a replacement for the obsolete Top and Bottom layout guides in the UIViewController. To use the new secure area, select the "Safe Area Planning Guide" in the File Inspector for the view controller, and then add restrictions between your content and the new safe area bindings. This prevents your content from being obscured by the top and bottom bars and the skip area on tvOS. Secure area restrictions translate to the top and bottom when deployed to earlier versions of iOS.

enter image description here


Here is a simple link as a comparison (to make a similar visual effect) between the existing layout guide (top and bottom) and the safe area planning guide.

Safe Zone Configuration: enter image description here

AutoLayout

enter image description here


Here's the official Apple Developer documentation for Safe Zone Planning Guide


A secure area is required to handle the user interface design for iPhone-X. Below is a basic guide for How to create a user interface for iPhone-X using the safe area format

0
source

Source: https://habr.com/ru/post/1269479/


All Articles