Skip to content

gali8/KeyboardProtocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeyboardProtocol: ViewController Extension for ScrollView

License Language

KeyboardProtocol is ready to be used with your UIViewController. Scrollview inset and offset, are automatically calculated on the first responder.

How to use:

Import the KeyboardExtension.swift file into your Swift project.

Implement KeyboardProtocol:

class ViewController: UIViewController, KeyboardProtocol {
...
}

Add and connect the ScrollView:

@IBOutlet var scrollView: UIScrollView!

Then register for keyboard notifications:

override func viewDidLoad() {
    super.viewDidLoad()

    self.registerForKeyboardNotification()
}

and run. :)

Demo

License

KeyboardProtocol is distributed under the MIT license (see LICENSE.md).

Buy me a beer

If you like my work, please buy me a beer (tap the beer):

Contributors

Daniele Galiotto (founder) - Co-Founder at Nexor Technology srl - www.nexor.it

About

Automatic scrollview content inset and offset

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages