I have a messaging app that has the typical UI design of a text field at the bottom of a full screen table view. I am setting that text field to be the view controller\'s
In the case you already have a custom view loaded via nib file.
Add a convenience constructor like this:
convenience init() {
self.init(frame: .zero)
autoresizingMask = .flexibleHeight
}
and override intrinsicContentSize
:
override var intrinsicContentSize: CGSize {
return .zero
}
In the
nib
set the first bottom constraint (of views that should stay above the safe area) tosafeArea
and the second one tosuperview
with lowerpriority
so it can be satisfied on older iOS.