An instance of the UITextInputMode class represents the current text-input mode. You can use this object to determine the primary language currently being used for text input.

既表示当前文本输入模式的一个类,可以用它来确定当前输入的语言

  • 确定textfiled的正在输入的语言

    myTextField.textInputMode?.primaryLanguage

    返回值是一个BCP 47 language code中一个。如"en", "en-US"
    BCP47

  • 判断切换输入法

    监听UITextInputCurrentInputModeDidChange通知。

UITextInputMode的更多相关文章

  1. UITextInputMode类的使用

    转载请注明:http://blog.sina.com.cn/s/blog_69081e060100v7ad.html   UITextInputMode大家看了是不是有些陌生呢?这个类是在4.2之后才 ...

  2. UITextInputMode currentInputMode is deprecated. 警告的解决

    如果你的工程最低支持版本为7.0 你会发现有警告 : 'currentInputMode' is deprecated: first deprecated in iOS 7.0 替换方案:UIText ...

  3. iOStextFiled判断输入长度

    个人在开发当中发现在用textField的代理方法 -(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(N ...

  4. 你真的了解UITextField吗?

    一:首先查看一下关于UITextField的定义 NS_CLASS_AVAILABLE_IOS(2_0) @interface UITextField : UIControl <UITextIn ...

  5. 你真的了解UIResponder吗?

    1:首先查看一下关于UIResponder的定义 NS_CLASS_AVAILABLE_IOS(2_0) @interface UIResponder : NSObject //响应链中负责传递事件的 ...

  6. UITextField限制中英文字数和光标定位以及第三方输入限制问题

    先自定义一个UITextField的子类HLNavTextField,在控制器里调用子类的- (void)limitHansLength:(int)hans otherLength:(int)othe ...

  7. UITextField限制输入文字

    一.viewDidLoad时监听通知 NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; [center addO ...

  8. IOS开发之——意见反馈UITextView的使用+不能输入字符输入

    @interface DMFeedbackViewController ()<UITextViewDelegate,UIAlertViewDelegate>@property (nonat ...

  9. iOS自定义发送消息输入框

    简单的封装了一个,免得麻烦直接初始化就可以用了 ,有其他需求该里面参数就行了 WJEasyInputTextView.h , CGRectGetHeight([UIScreen mainScreen] ...

随机推荐

  1. linux下echo与time服务的程序实现

    一.针对ECHO服务的TCP客户软件的实现 1.网络拓扑结构: 2.源码: #include <stdio.h> #include <stdlib.h> #include &l ...

  2. spark属性

    应用属性 属性名 缺省值 意义 spark.app.name (none) The name of your application. This will appear in the UI and i ...

  3. ios学习杂记

    commond  + alt + enter Xcode分屏.拖动xib连线

  4. Python之多进程和多线程

    目标: 1.os.fork简单示例 2.使用os.fork多进程测试IP是否在线 3.使用os.fork多进程解决tcpserver多客户端连接问题 4.多线程测试IP地址是否在线 1.os.fork ...

  5. ansible介绍与安装

    一.什么是ansible ansible是python中一套模块,系统中的一套自动化工具,可以用来作系统管理.自动化命令等任务. 二.ansible优势 .ansible是Python中一套完整的自动 ...

  6. HBase列族高级配置

    转自:http://blog.sina.com.cn/s/blog_ae33b83901018euz.html ------------------ HBase有几个高级特性,在你设计表时可以使用.这 ...

  7. ORACLE 异机恢复

    有时候需要将大的数据库发布到客户现场或转移机器时,不得不考虑在异机上恢复已经调整.测试好的库. dumpdp 全备的方法虽然易用,但在处理对象.索引.空间的时候异常的出错,比如:见有些公司,建表.索引 ...

  8. 如何查找文件中的schema约束

    1.下载一个spring3.2的jar和source 然后打开source的文件(路径:\spring-framework-3.2.5.RELEASE\docs\spring-framework-re ...

  9. JAVA 异常分类与理解

    摘自CSDN:::::http://blog.csdn.net/hguisu/article/details/6155636 1. 引子 try…catch…finally恐怕是大家再熟悉不过的语句了 ...

  10. 手动安装Chrome截屏控件扩展-Xproer.ScreenCapture(ScreenCapture.crx)

    1.打开扩展面板,在地址栏中输入 chrome://extensions   或通过"扩展程序"菜单打开   2.将ScreenCapture.crx拖拽到此面板中   3.选择添 ...