Skip to content

onmotion/ASViewController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASViewController

Version License Platform

Example

sample

Requirements

iOS 8.0+ Swift 4.0

Installation

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

pod 'ASViewController'
  • Add import ASViewController to your ViewController

  • Inherit your ViewController from ASViewController instead UIASViewController

  • then wrap your view contains text fields into UIScrollView, add @IBOutlet and bind it to scrollableArea as so:

sample2

  • Setup AutoLayout like so:

1

2

Settings

Also you can set up offset to text field (default = 20)

ASViewController.offset = 10
ASViewController.dismissKeyboardWhenTapAnywhere = true // (default = false) keyboard will be hidden when tapped anywhere outside textfield

Author

Alexandr Kozhevnikov, onmotion1@gmail.com

License

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

About

iOS ViewController with auto scroll to active textField when keyboard is showing

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published