键盘处于活动状态时 UITextView 自动大写不起作用 [英] UITextView autocapitalization is not working when keyboard is active

查看:27
本文介绍了键盘处于活动状态时 UITextView 自动大写不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在像这样的按钮目标中设置自动大写

Currently, I am setting autocapitalization in a button target like this

//This method is fired when keyboard is still active
- (IBAction)changeAutoCapitalization:(id)sender
{   
      self.textView.autocapitalizationType = UITextAutocapitalizationTypeWords;
}

但这不会使键盘变成大写.

But this won't make keyboard to capital.

推荐答案

你必须在修改 UITextAutocapitalizationType 之后调用 [self.textView reloadInputViews] 才能立即改变键盘.

You have to call [self.textView reloadInputViews] after modifying the UITextAutocapitalizationType in order to change keyboard immediately.

这篇关于键盘处于活动状态时 UITextView 自动大写不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆