fix update constraints
This commit is contained in:
parent
02e1de9b88
commit
ca389567cc
@ -44,9 +44,9 @@ open class ScrollingViewController: ViewController {
|
||||
}
|
||||
|
||||
open override func updateViewConstraints() {
|
||||
super.updateViewConstraints()
|
||||
// Sets the width of the content to the width of the screen.
|
||||
contentWidthConstraint?.constant = view.bounds.width - scrollView.contentInset.left - scrollView.contentInset.right
|
||||
super.updateViewConstraints()
|
||||
}
|
||||
|
||||
open override func viewDidLayoutSubviews() {
|
||||
|
||||
@ -67,9 +67,10 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController {
|
||||
}
|
||||
|
||||
open override func updateViewConstraints() {
|
||||
super.updateViewConstraints()
|
||||
|
||||
guard let tableView = tableView else { return }
|
||||
guard let tableView = tableView else {
|
||||
super.updateViewConstraints()
|
||||
return
|
||||
}
|
||||
|
||||
let minimumSpace: CGFloat = minimumFillSpace()
|
||||
var currentSpace: CGFloat = 0
|
||||
@ -89,7 +90,10 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController {
|
||||
totalMinimumSpace += minimumSpace
|
||||
}
|
||||
|
||||
guard fillTop || fillBottom else { return }
|
||||
guard fillTop || fillBottom else {
|
||||
super.updateViewConstraints()
|
||||
return
|
||||
}
|
||||
|
||||
let newSpace = MVMCoreUIUtility.getVariableConstraintHeight(currentSpace, in: tableView, minimumHeight: totalMinimumSpace)
|
||||
let width = view.bounds.width
|
||||
@ -110,6 +114,7 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController {
|
||||
showFooter(width)
|
||||
}
|
||||
}
|
||||
super.updateViewConstraints()
|
||||
}
|
||||
|
||||
//MARK: - Header Footer
|
||||
|
||||
@ -42,8 +42,8 @@ open class ThreeLayerViewController: ProgrammaticScrollViewController {
|
||||
}
|
||||
|
||||
open override func updateViewConstraints() {
|
||||
super.updateViewConstraints()
|
||||
guard let scrollView = scrollView else {
|
||||
super.updateViewConstraints()
|
||||
return
|
||||
}
|
||||
|
||||
@ -52,6 +52,7 @@ open class ThreeLayerViewController: ProgrammaticScrollViewController {
|
||||
} else {
|
||||
heightConstraint?.constant = -scrollView.contentInset.top - scrollView.contentInset.bottom
|
||||
}
|
||||
super.updateViewConstraints()
|
||||
}
|
||||
|
||||
open override func loadView() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user