Fix home screen shrinking too much on keyboard opening.

This commit is contained in:
Stefan Ceriu
2022-05-19 15:51:50 +03:00
committed by Stefan Ceriu
parent 60688dda46
commit b0189d9204

View File

@@ -44,11 +44,16 @@ class HomeViewControllerWithBannerWrapperViewController: UIViewController, MXKVi
view.backgroundColor = .clear
stackView = UIStackView()
stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.axis = .vertical
stackView.distribution = .fill
stackView.alignment = .fill
view.vc_addSubViewMatchingParentSafeArea(stackView)
view.addSubview(stackView)
NSLayoutConstraint.activate([stackView.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor),
stackView.leftAnchor.constraint(equalTo: self.view.leftAnchor),
stackView.rightAnchor.constraint(equalTo: self.view.rightAnchor),
stackView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor)])
addChild(homeViewController)
stackView.addArrangedSubview(homeViewController.view)