We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 表现 问题的具体描述 集成QMUIKit的项目,在iOS 14 上输入控件弹出系统键盘后,点击系统键盘的表情切换,会导致崩溃
截图
我的解决方案如下 将UITextInputTraits+QMUI.m文件中
UITextInputTraits+QMUI.m
ExtendImplementationOfNonVoidMethodWithSingleArgument(inputClass, @selector(initWithFrame:), CGRect, UIView<UITextInputTraits> *, ^UIView<UITextInputTraits> *(UIView<UITextInputTraits> *selfObject, CGRect firstArgv, UIView<UITextInputTraits> *originReturnValue) { if (QMUICMIActivated) selfObject.keyboardAppearance = KeyboardAppearance; selfObject.qti_didInitialize = YES; return originReturnValue; });
替换为如下代码
ExtendImplementationOfNonVoidMethodWithSingleArgument(inputClass, @selector(initWithFrame:), CGRect, UIView<UITextInputTraits> *, ^UIView<UITextInputTraits> *(UIView<UITextInputTraits> *selfObject, CGRect firstArgv, UIView<UITextInputTraits> *originReturnValue) { // iOS 14 上切换系统表情输入法时, 系统会创建 TUIEmojiSearchTextField // 此时如果在这里设置 keyboardAppearance 就会导致 一直调用 -[TUIEmojiSearchTextField initWithFrame:pretendsToBecomeFirstResponder:] // 最终死循环导致crash if (![NSStringFromClass(selfObject.class) isEqualToString:@"TUIEmojiSearchTextField"] && QMUICMIActivated) { selfObject.keyboardAppearance = KeyboardAppearance; } selfObject.qti_didInitialize = YES; return originReturnValue; });
其他信息
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
感谢反馈,我们下个版本处理一下,可以按照提供的解决方法修改源码。
已发布 4.2.0 修复该问题。
No branches or pull requests
Bug 表现
问题的具体描述
集成QMUIKit的项目,在iOS 14 上输入控件弹出系统键盘后,点击系统键盘的表情切换,会导致崩溃
截图

我的解决方案如下
将
UITextInputTraits+QMUI.m
文件中替换为如下代码
其他信息
The text was updated successfully, but these errors were encountered: