Maison  >  Questions et réponses  >  le corps du texte

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中文网2740 Il y a quelques jours616

répondre à tous(3)je répondrai

  • 天蓬老师

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

    Avez-vous effectué des réglages pour le clavier ou le clavier a-t-il été modifié lors de l'exécution dans la classe tierce référencée ?

    répondre
    0
  • 高洛峰

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

    Copiez votre propre projet, puis supprimez petit à petit le code lié au clavier jusqu'à ce que vous le résolviez.

    répondre
    0
  • 天蓬老师

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

    Avez-vous utilisé l'environnement CocoaPod pour importer des bibliothèques tierces

    répondre
    0
  • Annulerrépondre