Tencent / QMUI_iOS

QMUI iOS——致力于提高项目 UI 开发效率的解决方案
http://qmuiteam.com/ios
Other
7.11k stars 1.39k forks source link

可能是QMUITextView 引起的闪退 #1549

Closed YuStephen closed 6 months ago

YuStephen commented 6 months ago

Bug 表现 线上用户反馈的报错,无法复现,根据用户反馈,是在点击输入框的时候造成的闪退。猜测,可能是QMUITextView在修改自身高度的时候引起的,下面贴了报错的堆栈信息和相关代码。诸位看看到底是因为什么原因,抱拳!

截图 Bug 现场的界面截图,或者 Xcode 控制台的错误信息截图,有问题的代码截图 image

初始化 self.textView = [[QMUITextView alloc] initWithFrame:CGRectZero]; self.textView.font = UIFontMake(14); self.textView.maximumHeight = 100; self.textView.textColor = UIColor.ts_themeDescriptionTextColor; self.textView.backgroundColor = UIColorMakeWithHex(@"#F6F6F6"); self.textView.layer.cornerRadius = 18; self.textView.textContainerInset = UIEdgeInsetsMake(10, 7, 10, 35); self.textView.returnKeyType = UIReturnKeySend; self.textView.enablesReturnKeyAutomatically = YES; self.textView.delegate = self; [self.topContainerView addSubview:self.textView];

[self.textView mas_makeConstraints:^(MASConstraintMaker *make) {
    make.left.equalTo(self.voiceButton.mas_right).offset(10);
    make.right.equalTo(-20);
    make.height.equalTo(self.currentTextViewHeight);
    make.top.equalTo(12);
    make.bottom.equalTo(-12);
}];

修改高度

其他信息

YuStephen commented 6 months ago

不是QMUI的问题