首页 > TAG信息列表 > UIResponder
Swift 视图随键盘弹出向上移动
主要是通过观察者监听来完成 import UIKit class TFVC: UIViewController { override func viewDidLoad() { super.viewDidLoad() hideKeyboardWhenTappedAround() let tf = UITextField(frame: CGRect(x: 0, y: 0, width: 120, height: 44))