CocoaPods trunk is moving to be read-only. Read more on the blog, there are 10 months to go.

ScrollingFormHelper 0.3.0

ScrollingFormHelper 0.3.0

Maintained by Lautaro de los Heros.



  • By
  • lautarodelosheros

ScrollingFormHelper

Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 9.0+

Installation

ScrollingFormHelper is available through Swift Package Manager, simply add it as a new dependency.

ScrollingFormHelper is also available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ScrollingFormHelper'

Usage

Initialize an instance of ScrollingFormHelper on the view controller's viewDidLoad method:

override func viewDidLoad() {
    super.viewDidLoad()
    
    scrollingFormHelper = ScrollingFormHelper(scrollView: scrollView, shouldDismissKeyboardOnTap: true)
    textField.delegate = self
}

Then set the currentTextField attribute on textFieldDidBeginEditing (You need to set the delegate for each one of your text fields):

extension ViewController: UITextFieldDelegate {
    func textFieldDidBeginEditing(_ textField: UITextField) {
        scrollingFormHelper?.currentView = textField
    }
}

You can also refer to the example app on this repository.

Author

lautarodelosheros, [email protected]

License

ScrollingFormHelper is available under the MIT license. See the LICENSE file for more info.