Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // textField 裡面輸入的字右移
- extension UITextField{
- func moveLeft(){
- self.leftView = UIView.init(frame:CGRect(x: 0,y: 0,width: 5,height: 0))
- self.leftViewMode = .always
- }
- }
- xxxxTextField.moveLeft()
- // 點擊空白處 收起鍵盤
- @objc func viewTapped(gestureRecognizer: UITapGestureRecognizer){
- view.endEditing(true)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement