简体   繁体   English

如何在UITextView iPhone键盘中禁用自动完成功能

[英]How to Disable autocomplete in UITextView iPhone keyboard

I am doing the application in which I want to disable the autocomplete feature of the keyboard in a textfield. 我正在做的应用程序,我想在文本字段中禁用键盘的自动完成功能。 How can I do this? 我怎样才能做到这一点?

Use epatel's method if you're using IB. 如果您正在使用IB,请使用epatel的方法。 If you're not using IB, then try the method 如果您不使用IB,请尝试使用该方法

-setAutoCorrectionType:

and pass UITextAutocorrectionTypeNo 并传递UITextAutocorrectionTypeNo

In InterfaceBuilder you should set the Text Input Trait for Correction to No 在InterfaceBuilder中,您应该将更正的Text Input Trait设置为No

alt text http://img.skitch.com/20091231-e5fwp8yhm3jsmjdy2hgk8ewgac.jpg 替代文字http://img.skitch.com/20091231-e5fwp8yhm3jsmjdy2hgk8ewgac.jpg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM