Skip to main content

Posts

Showing posts from August, 2019

Move up textfield when keyboard appears on UIViewController in Swift

Move up textfield when keyboard appears on UIViewController in Swift import UIKit import Foundation import Alamofire class ViewController: UIViewController , UIScrollViewDelegate , UITextFieldDelegate {          @IBOutlet weak var scrollViewBottonConstraint: NSLayoutConstraint !     @IBOutlet weak var emailTextField: UITextField !     @IBOutlet weak var passwordTextfield: UITextField !          @IBOutlet weak var scrollView: UIScrollView !               override func viewDidLoad() {         super . viewDidLoad ()         scrollView . contentSize = view . frame . size         let tabGesture = UITapGestureRecognizer (target: self , action: #selector (didTapView(gesture:)))         view . addGestureRecognizer (tabGesture)     }          override func viewDidAppear( _ animated: Bool ) {         super . viewDidAppear (animated)         addObservers ()     }     override func viewDidDisappear( _ animated: Boo