Tencent / QMUI_iOS

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

UIMenuController+QMUI windowForFirstResponder 引起的闪退 #1139

Closed pomin closed 3 years ago

pomin commented 3 years ago

Bug 表现 问题的具体描述

QMUITextField 在键盘弹起的情况下再点击,处理UIMenuController相关业务的时候,会通过 UIApplication.sharedApplication.delegate.window 查找当前的window,如果AppDelegate 里面没有window属性,应用就会闪退。

如何重现

  1. 创建一个全新的项目,AppDelegate不做任何处理。
  2. 在项目中使用 QMUITextField,点击唤起键盘,再次点击TextField,就会复现。
MoLice commented 3 years ago

重复 #766