Skip to content
Auto slide the view when keyboard appears
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DPKeyboardManager App.xcodeproj
DPKeyboardManager App support for Swift 4.2 and later Mar 26, 2019
.gitignore
DPKeyboardManager.podspec
DPKeyboardManager.swift
LICENSE
README.md

README.md

DPKeyboardManager

Auto slide the view when keyboard appears

HOW TO USE :

import UIKit

class DPBaseViewController: UIViewController {

   let keyboardManager = DPKeyboardManager()
   
   override func viewDidLoad() {
       super.viewDidLoad()
        
	   keyboardManager.loadKeyboardEvents(self)
   }
   
   override func viewDidAppear(_ animated: Bool) {
       super.viewDidAppear(animated)
       keyboardManager.enableKeybaordEvents()
   }

   override func viewWillDisappear(_ animated: Bool) {
       super.viewWillDisappear(animated)
       keyboardManager.disableKeyboardEvents()
   }
   
   override var shouldAutomaticallyForwardAppearanceMethods: Bool {
       return !keyboardManager.isEmbeddedViewController
   }
   
}

that's all !!

You can’t perform that action at this time.