On the second day of work in 2018, he had a big pot on his back. Our project has a search function, in this version, in order to enhance the optimization, remove the filter space request, this may be able to add a good user experience, on the contrary, stealing chicken does not eclipse the rice. Did not think that the input method of the Apple system can automatically Lenovo, in the absence of the choice of Chinese characters, unexpectedly can Lenovo out a lot of smart pinyin, what??? And this kind of operation???? Lost in the I almost do not use the input method of the Apple system, my phone settings are generally the Apple's input method has been deleted, directly using Sogou. (The input method of the Apple system is too difficult to use)
Well, now look at the input before you block pinyin.
When I entered the blue sea when I did not choose the Chinese character system will automatically splice some pinyin.
Compare the printed content, have you ever felt very pleasantly surprised? How to get rid of pinyin? Add an event to the input box to filter out pinyin in the event you can try it.
_searchtextfield = [[Uitextfield alloc]initwithframe:cgrectmake (KSCREENWIDTH-40, 50)];
_searchtextfield.delegate = self;
_searchtextfield.backgroundcolor = [Uicolor Orangecolor];
_searchtextfield.placeholder = @ "Input funds, fast positioning";
_searchtextfield.returnkeytype = Uireturnkeydone;
_searchtextfield.clearbuttonmode = uitextfieldviewmodewhileediting;
[_searchtextfield addtarget:self Action: @selector (searchtextfieldchanges:) forControlEvents: Uicontroleventeditingchanged];
[Self.view Addsubview:_searchtextfield];
-(void) Searchtextfieldchanges: (Uitextfield *) textfield{
if (Textfield.markedtextrange = = nil) {
NSLog (@ "Chinese characters that appear after the Chinese characters are selected:%@", Textfield.text);
}
}
IOS----------Uitextfield Enable filtering of selected states pinyin