Skip to content

It's a smart KeyBoard manager with active text field using Scroll View along with Constraints in Objective C & Swift 4

License

Notifications You must be signed in to change notification settings

ssowri1/SPKeyBoardAvoiding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPKeyBoardAvoiding

It's a smart KeyBoard manager with an active text field using Scroll View along with Constraints in Objective C & Swift 4. The codeless drop-in universal library is compatible with both Swift and Objective C. It will show the chosen text field upon the keyboard while editing or anything else.

Screenshot

Installation

Step I

Drag and drop the SPKeyBoardAvoiding scrollview sub class to your project.

Step II

Change your scrollview class name as SPKeyBoardAvoiding in storyboard which containds bundles of textfields. And create the instance of your scrollview as such as,

@IBOutlet weak var scrollView: SPKeyBoardAvoiding!

Step III

Make sure the UITextFieldDelegate is presence in your class & Just put the below textFieldShouldReturn method to your class and update as follows,

func textFieldShouldReturn(_ textField: UITextField) -> Bool { // Reset the scrollview content offset self.scrollView.setContentOffset(CGPoint.zero, animated: true) self.view.endEditing(true) return true }

Awesome! You're done now. any make fun with your code snippets.

Authors

Ssowri1

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details

Support or Contact

Having trouble with Pages? Kindly contact support and we’ll help you sort it out.

About

It's a smart KeyBoard manager with active text field using Scroll View along with Constraints in Objective C & Swift 4

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published