Fix constraint issues

This commit is contained in:
nielsandriesse 2020-06-20 10:21:44 +10:00
parent 58fbd16286
commit d18940317b
2 changed files with 3 additions and 3 deletions

View file

@ -181,8 +181,8 @@ class MediaPageViewController: UIPageViewController, UIPageViewControllerDataSou
self.view.addSubview(bottomContainer)
bottomContainer.autoPinWidthToSuperview()
bottomContainer.autoPinEdge(toSuperviewSafeArea: .bottom)
footerBar.autoPinEdge(toSuperviewSafeArea: .bottom)
bottomContainer.autoPinEdge(.bottom, to: .bottom, of: view)
footerBar.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
footerBar.autoSetDimension(.height, toSize: 44)
updateTitle()

View file

@ -533,7 +533,7 @@ public class MediaTileViewController: UICollectionViewController, MediaGalleryDa
// show toolbar
UIView.animate(withDuration: 0.1, delay: 0, options: .curveEaseInOut, animations: {
NSLayoutConstraint.deactivate([self.footerBarBottomConstraint])
self.footerBarBottomConstraint = self.footerBar.autoPinEdge(.bottom, to: .bottom, of: self.view)
self.footerBarBottomConstraint = self.footerBar.autoPinEdge(toSuperviewSafeArea: .bottom)
self.footerBar.superview?.layoutIfNeeded()