Layout Guide, ReadableContentGuide in swift

Constraints of label
View looks without ReadableContentGuide
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 0
NSLayoutConstraint.activate([label.topAnchor.constraint(equalTo: view.topAnchor, constant: 50),label.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor, constant: 16),label.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor, constant: -16)
View looks with ReadableContentGuide

Note that the readable content guide will never extend beyond the view’s layout margin guide



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store