ios - textView中键盘输入的内容被自动省略
PHP中文网
PHP中文网 2017-04-18 09:45:13
0
3
647


本人维护的APP中,所有textView/textField调用键盘的地方,输入的文字超过2个字在输入法中都会被省略,不论是用系统自带输入法还是第三方输入法都是这样,其他的APP均表现正常,而且textView/textField并没有做特别的处理:

  _textField = [[UITextField alloc] init];
    _textField.backgroundColor = [UIColor clearColor];
    _textField.textColor = [UIColor textNormalColor];
    _textField.font = [UIFont systemFontOfSize:16.f];
    _textField.textAlignment = NSTextAlignmentLeft;
    _textField.clearButtonMode = UITextFieldViewModeAlways;
    _textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    [self.contentView addSubview:_textField];

没有查到相关的资料,希望遇到相似问题的同学能分享下解决方案,谢谢!

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
Peter_Zhu

Have you made any settings for the keyboard, or have the keyboard been changed at runtime in the referenced third-party class?

小葫芦

Copy your own project, and then delete the keyboard-related code bit by bit until you solve it.

Peter_Zhu

Have you used the CocoaPod environment to import third-party libraries

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template