Word autocapitalization does not work in UITextView

I have UITextViewone that should autocapitalize words. However, when I call any of these methods, the view does not respond.

[self.fullNameTextView setAutocapitalizationType:UITextAutocapitalizationTypeWords];
self.fullNameTextView.autocapitalizationType = UITextAutocapitalizationTypeWords;

Is this a bug in iOS 8.1?

+4
source share
4 answers

I had the same problem and I was able to solve it by setting my keyboard type back to DEFAULT:

enter image description here

+14
source

โ†’ - > . , . . . , .

+5

. ?

, Hardware > Keyboard > Connect Hardware Keyboard (Uncheck) . iOS 8.1 UITextField UITextView.

Edit

. , , :

NSString *myString = @"this is my uncapitalised string";
self.fullNameTextView.text = [myString capitalizedString]
+1
 self.fullNameTextView.autocapitalizationType = UITextAutocapitalizationTypeWords; 

Note. This will not work if its simulator or auto-capitalization is disabled in the menu "Settings"> "General"> "Keyboard"> "Auto-capitalization" on iOS / iDevice. this solution does not work if auto-correction is disabled for text viewing.

0
source

Source: https://habr.com/ru/post/1570082/


All Articles