Created
October 9, 2018 12:53
-
-
Save gopalkrishnareddy/5aecd590676a7e276d1fb36b067eb839 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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