Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. ExpiryOutlet.addTarget(self, action: #selector(ExpiryDidChange(_:)), for: .editingChanged)
  2.  
  3. func ExpiryDidChange(_ textField: UITextField) {
  4. if textField == ExpiryOutlet {
  5.  
  6. if textField.text != "" && textField.text?.characters.count == 2 {
  7. textField.text = "(textField.text!) / "
  8. }
  9.  
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement