Fix toolbar being too close to screen bottom on non-notched iPhones
This commit is contained in:
parent
f647402a41
commit
444c4c053d
|
@ -107,11 +107,14 @@ class ToolbarView: UIView {
|
||||||
stack.alignment = .fill
|
stack.alignment = .fill
|
||||||
stack.translatesAutoresizingMaskIntoConstraints = false
|
stack.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(stack)
|
addSubview(stack)
|
||||||
|
let safeAreaConstraint = stack.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor)
|
||||||
|
safeAreaConstraint.priority = .defaultHigh
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
stack.leadingAnchor.constraint(equalTo: leadingAnchor),
|
stack.leadingAnchor.constraint(equalTo: leadingAnchor),
|
||||||
stack.trailingAnchor.constraint(equalTo: trailingAnchor),
|
stack.trailingAnchor.constraint(equalTo: trailingAnchor),
|
||||||
stack.topAnchor.constraint(equalTo: topAnchor, constant: 5),
|
stack.topAnchor.constraint(equalTo: topAnchor, constant: 5),
|
||||||
stack.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor),
|
safeAreaConstraint,
|
||||||
|
stack.bottomAnchor.constraint(lessThanOrEqualTo: bottomAnchor, constant: -8)
|
||||||
])
|
])
|
||||||
|
|
||||||
updateNavigationButtons()
|
updateNavigationButtons()
|
||||||
|
|
Loading…
Reference in New Issue