Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to dismiss keyboard in iOS
import UIKit
class RegistrationViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var firstNameField: UITextField!
@IBOutlet weak var lastNameField: UItextField!
override func viewDidLoad(){
fileprivate func configurations(){
firstNameField.delegate = self
lastNameField.delegate = self
internal func textFieldShouldReturn(_ textField: UITextField) -> Bool {
return true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.