2019-01-20 12:34:40 +01:00
|
|
|
//
|
|
|
|
|
// UIViewControllerExtension.swift
|
2021-08-28 07:32:31 +02:00
|
|
|
// passKit
|
2019-01-20 12:34:40 +01:00
|
|
|
//
|
|
|
|
|
// Created by Yishi Lin on 5/4/17.
|
|
|
|
|
// Copyright © 2017 Yishi Lin. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
2020-11-07 12:06:28 +01:00
|
|
|
public extension UIViewController {
|
2020-06-28 21:25:40 +02:00
|
|
|
@objc
|
2020-11-07 12:06:28 +01:00
|
|
|
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
2019-01-20 12:34:40 +01:00
|
|
|
if textField.nextField != nil {
|
|
|
|
|
textField.nextField?.becomeFirstResponder()
|
|
|
|
|
} else {
|
|
|
|
|
textField.resignFirstResponder()
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|