6

So we have predictive bar in iOS 8 but it covers my input field above the keyboard. I found only one solution to hide it by setting correction of textView to NO. But it turns off correction as well which is not good.Any suggestions?Is there any api for this stuff from Apple?

efimovdk
  • 368
  • 4
  • 16

4 Answers4

10

Setting autocorrectionType to UITextAutocorrectionTypeNo on the UITextView in question (or correction to NO in IB) disables autocorrect as well as the predictive text bar in iOS 8. There doesn't appear to be a way to disable just the predictive bar however.

Casey Fleser
  • 5,707
  • 1
  • 32
  • 43
2

You can do it from the UI too. When selecting the text field element, change the Correction option to No

enter image description here

Mohsen
  • 64,437
  • 34
  • 159
  • 186
2
- (void)textFieldDidBeginEditing:(UITextField *)textField {

    UITextInputAssistantItem* item = [textField inputAssistantItem];
    item.leadingBarButtonGroups = @[];
    item.trailingBarButtonGroups = @[];
}

try this

Sudhakar Tharigoppula
  • 2,857
  • 3
  • 16
  • 17
0

In later iOS versions only this worked for me:

searchBar.textContentType = UITextContentType(rawValue: "")
Matej Ukmar
  • 2,157
  • 22
  • 27