This resolve a common issue that affects the footer of a tableView:
- must be anchored to the bottom of the page if the content of table is smaller than the page height
- scrolls with the tableView if the content is larger than the page height
- stretch following the bounce of the table view
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS 9.0, Swift 4.
FooterLinker is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'FooterLinker'
- Create a table view and a footer view in your view controller storyboard.
- The bottom constraint of the footer and the table view must be linked.
- FooterLinker must be strong retained by the view controller. To initialize and setup it just use this simple line of code:
FooterLinker(scrollView: tableView, footerView: footerView)
Alice Migliorati, alice.migliorati@outlook.it
FooterLinker is available under the MIT license. See the LICENSE file for more info.