Freeze
What it does
Freeze is a simple method you call against any tableView in your project that determines whether or not it exceeds the bounds of the screen. If it does not, it will lock the table so that it does not scroll.
Requirements
- iOS 9.3+
- Xcode 8.x (1.1)
- Xcode 9.x (2.x)
- Swift 3.x (Version 1.1)
- Swift 4.x (Version 2.x)
Installation
Freeze is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Freeze"
Instructions
Import the framework:
import Freeze
It is recommended that you call this method as seen outlined below:
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
tableView.shouldLock()
}
override func viewWillTransition(to size: CGSize,
with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
tableView.shouldLock()
}
Calling it before the view has finished rendering the table may result in an incorrect value being set.
Changelog
Changelog | See the changes introduced in each version.
Author
Sean McNeil
License
Freeze is available under the MIT license. See the LICENSE file for more info.