Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

KR1Z00/keyboard-helper.swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Swift Helpers!

This repository is a collection of various swift helpers. Helpers are classes that are inherited to provide added functionality with ease. Below is a list of the current helpers in the repository along with instructions on how to implement them.

Keyboard Handling View Controller

This class is a View Controller that already has all the functionality needed to handle keyboard related events. It handles things such as:

  • Hiding the keyboard when the user taps the return key
  • Hiding the keyboard if the user taps outside of the textfield
  • Moving the view upwards if the keyboard will hide the selected textfield

How to implement this helper

Using this helper is very simple.

  1. Copy and paste the KeyboardHandlingViewController.swift file into your project directory
  2. Create a new class for your view controller and make it inherit the KeyboardHandlingViewController class as such:
class MyViewController: KeyboardHandlingViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }

}

You're good to go!

About

Various Swift helpers made to make your life easier!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages