search

Home  >  Q&A  >  body text

ios - textView中键盘输入的内容被自动省略


本人维护的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中文网2808 days ago673

reply all(3)I'll reply

  • 天蓬老师

    天蓬老师2017-04-18 09:47:13

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

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:47:13

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

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 09:47:13

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

    reply
    0
  • Cancelreply