Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
extension UITextView {
func hideSuggestions() {
// Removes suggestions only
autocorrectionType = .no
//Removes Undo, Redo, Copy & Paste options
removeUndoRedoOptions()
}
}
extension UITextField {
func hideSuggestions() {
// Removes suggestions only
autocorrectionType = .no
//Removes Undo, Redo, Copy & Paste options
removeUndoRedoOptions()
}
}
extension UIResponder {
func removeUndoRedoOptions() {
//Removes Undo, Redo, Copy & Paste options
inputAssistantItem.leadingBarButtonGroups = []
inputAssistantItem.trailingBarButtonGroups = []
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.