VQA bug fix for bottom spacing below tableview.

This commit is contained in:
Khan, Arshad 2019-10-09 13:53:10 +05:30
parent fe7fb2db03
commit 3606ce4c82
2 changed files with 11 additions and 1 deletions

View File

@ -61,6 +61,11 @@ open class ThreeLayerTableViewController: MFProgrammaticTableViewController {
return nil
}
/// Space between the bottom view and the table sections, nil to fill. nil default
open func spaceBelowBottomView() -> CGFloat? {
return nil
}
/// can override to return a minimum fill space.
open func minimumFillSpace() -> CGFloat {
return 0
@ -154,7 +159,7 @@ open class ThreeLayerTableViewController: MFProgrammaticTableViewController {
bottomViewTopConstraint?.isActive = true
bottomView.leftAnchor.constraint(equalTo: footerView.leftAnchor).isActive = true
footerView.rightAnchor.constraint(equalTo: bottomView.rightAnchor).isActive = true
footerView.bottomAnchor.constraint(equalTo: bottomView.bottomAnchor).isActive = true
footerView.bottomAnchor.constraint(equalTo: bottomView.bottomAnchor, constant: spaceBelowBottomView() ?? 0).isActive = true
self.footerView = footerView
showFooter(nil)
}

View File

@ -42,6 +42,11 @@ open class MoleculeListTemplate: ThreeLayerTableViewController {
return molecule
}
// for bottom gutter/free space
open override func spaceBelowBottomView() -> CGFloat? {
return PaddingDefaultVerticalSpacing
}
open override func newDataBuildScreen() {
super.newDataBuildScreen()
setup()