Mit der Veröffentlichung von iOS 8 möchte ich den vorhersagenden Textabschnitt der Tastatur deaktivieren, wenn ich anfange, ein UITextField einzugeben. Nicht sicher, wie das gemacht wird, jede Hilfe wäre willkommen!Disable UITextField Predictive Text
Antwort
die autoCorrectionType zu UITextAutocorrectionTypeNo Einstellung hat den Trick
Objective-C
textField.autocorrectionType = UITextAutocorrectionTypeYes;
textField.autocorrectionType = UITextAutocorrectionTypeNo;
Swift 2
textField.autocorrectionType = .Yes
textField.autocorrectionType = .No
Swift 3
textField.autocorrectionType = .yes
textField.autocorrectionType = .no
wie diese Sie auf o R off UITextAutocorrectionType
myTextView.autocorrectionType = UITextAutocorrectionTypeNo;
myTextView.autocorrectionType = UITextAutocorrectionTypeYes;
Gibt es eine Möglichkeit, dies zu tun, aber die automatische korrekte Funktionalität zu behalten? – mumush
Swift 2
textField.autocorrectionType = .Yes
textField.autocorrectionType = .No
Swift 3
textField.autocorrectionType = .yes
textField.autocorrectionType = .no
FIXED für SWIFT-3:
myTextField.autocorrectionType = .no
Tippen Sie auf den Sprachenschlüssel (der wie ein Globus oder möglicherweise ein Emoji-Smile-Gesicht aussieht) und halten Sie ihn gedrückt, und deaktivieren Sie den Schalter für Predictive.
Die gewählte Antwort ist korrekt, aber Sie haben auch die Möglichkeit, das gleiche im Storyboard zu tun.
Alles, was Sie brauchen, ist Ihr Textfeld auszuwählen und unter "Show the Attributes Inspector" Korrektur auf NO setzen. Überprüfen Sie das angehängte Bild.
- 1. anhänge Text mit UITextField Text
- 2. Mehrfachwort Predictive/Autocomplete Textarea?
- 3. UITextField Text verschwommen
- 4. UITextField verschwommener Text
- 5. UITextField Text fett formatieren?
- 6. Predictive Text für Passwort-Feld auf Websites deaktivieren
- 7. Detect UITextField Secure Text Entry überschriebener Text
- 8. UITextField Text springt iOS 9
- 9. Erlangung von Text in UITextField
- 10. UITextField horizontale Textausrichtung - Text nicht zentriert
- 11. UITextField schneidet den Text während der Bearbeitung
- 12. Wie ein UITextField Text in XCTest einstellen
- 13. Setzen UITextField Text-Eigenschaft in PrepareForSegue
- 14. Text in UITextField wird nicht richtig zentriert
- 15. UITextField Text verschwindet auf jedem anderen Tastendruck
- 16. emulieren Predictive OLSR-Protokoll auf emane
- 17. MATLAB Simple - Linear Predictive Coding und Energieprognose
- 18. Disable Information/Definition-Boxen in Anaconda in Sublime Text 3
- 19. Disable übereinstimmenden einzelnen Anführungszeichen in Atom Text Editor
- 20. Disable Click-Ereignisse für Links, während Auswählen von Text
- 21. Disable ToolbarItem Xamarin.Forms
- 22. UITextField Text nicht auf der linken Seite scrollen off
- 23. Wie benutzerdefinierte Text löschen von UITextField mit UIButton in iOS?
- 24. Wie ändere ich Text in UITextView und UITextField
- 25. Wenn auf UITextField Löschtaste Tastatur klicken verschwindet nicht Text
- 26. Resize UITextField horizontal mit Text mit Auto-Layout
- 27. Objective C - UILabel als Text für Benutzer in UITextField aktualisieren
- 28. Wie bekomme ich den Text von UITextField in einen NSString?
- 29. So scrollen Sie Text innerhalb von uitextfield iOS
- 30. Zugriff auf Text von UITextField in einem UITableViewCell
Sie sollten dies als die richtige Antwort markieren. – DanM
Vorsicht: 'myTextField.autocorrectionType = UITextAutocorrectionTypeNo;' muss vor '[myTextField becoreFirstResponder];' platziert werden, um effektiv zu sein. – Tulleb
Wird die automatische Korrektur nicht deaktiviert? Das Problem hier ist "Predictive Keyboard Toolbar" hinzugefügt wird, aber nicht AutoCorrection auf UITextAutocorrectionTypeNo deaktivieren auch Auto Correct? – daemon