Skip to content

Instantly share code, notes, and snippets.

@jamesaq12wsx
Last active June 22, 2018 02:57
Show Gist options
  • Save jamesaq12wsx/65a7cb5ace91deb1eac93b5fb05876d8 to your computer and use it in GitHub Desktop.
Save jamesaq12wsx/65a7cb5ace91deb1eac93b5fb05876d8 to your computer and use it in GitHub Desktop.
[swift]建立App內部鍵盤->實作switchKeyboard
func switchKeyboard() {
print("switch keyboard")
textField.endEditing(true);
if textField.inputView == nil {
textField.inputView = myKeyBoard
}else{
textField.inputView = nil
}
textField.becomeFirstResponder()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment