iOS UITextField实时监听获取输入内容,中文状态去除预输入拼音

http://blog.csdn.net/cse110/article/details/51360796

- (void)textFieldDidChange:(UITextField *)textField{  
    if (textField.markedTextRange == nil) {  
        NSLog(@"text:%@", textField.text);  
    }  
}

 

自带输入框, 上面显示拼音,没有点击的时候,还没显示汉字,用markedTextRange判断

posted on 2018-01-11 17:32  土匪7  阅读(680)  评论(0编辑  收藏  举报