TAGKeyboard 2.0.0

TAGKeyboard 2.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jun 2016
SPMSupports SPM

Maintained by Abhishek Thorat.



  • By
  • AbhishekThorat

TAGKeyboard

Example

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

Requirements

To integrate the TAGKeyboard in your project follow the steps :-

  1. “import TAGKeyboard”.
  2. extend your view controller with TAGKeyboard.
    class ViewController: TAGKeyboard {}
  3. Implement the viewDidLoad() and call the super.viewDidLoad() and also set the delegate instance for respective text view and text fields.

    override func viewDidLoad() {
      // "Do call the super"
      super.viewDidLoad()
      testTextView.delegate = self
      testTextfield.delegate = self
    }
    
  4. Now implement the respective delegates for text view and text field. “Do call the super of that perticular method.”
Examlple for text view delegates:-
override func textViewShouldBeginEditing(textView: UITextView) -> Bool {
    return (super.textViewShouldBeginEditing(textView))
}

override func textViewDidEndEditing(textView: UITextView) {
    super.textViewDidEndEditing(textView)
}

override func textViewDidBeginEditing(textView: UITextView) {
    super.textViewDidBeginEditing(textView)
}
Examlple for text field delegates:-
override func textFieldShouldReturn(textField: UITextField) -> Bool {
    return (super.textFieldShouldReturn(textField))
}

override func textFieldDidBeginEditing(textField: UITextField) {
    super.textFieldDidBeginEditing(textField)
}

override func textFieldDidEndEditing(textField: UITextField) {
    super.textFieldDidEndEditing(textField)
}

Installation

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

pod 'TAGKeyboard', '~>0.1.4'

Author

AbhishekThorat, [email protected]

License

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