Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two blank space in UITextView automatically inserts a . (fullstop) after text in iPhone

I have a UITextView where I am inserting comma separated values. but when ever I insert any text and gives two or more space after it. It automatically appends the FULL STOP after last text.

Is it due to Phone setting? Even if yes. How can we prevent it?

EDIT To reproduce it.. Enter any word in UITextView and then try to apply two spaces. It will automatically add fullstop at the end of hte word :)

like image 686
Suresh Varma Avatar asked Jul 28 '11 04:07

Suresh Varma


Video Answer


2 Answers

It's because of the setting '.' shortcut in keyboard settings.

like image 191
Krizai Avatar answered Sep 26 '22 00:09

Krizai


Apple describes the behaviour as: "Double tapping the space bar will insert a period followed by a space", and it is indeed an iOS system setting (Settings/General/Keyboard/"." Shortcut).

The user can disable the behaviour, but disabling it by code on a specific UITextView seems difficult - see iPhone: Disable the "double-tap spacebar for ." shortcut?

like image 29
dtur Avatar answered Sep 25 '22 00:09

dtur