Skip to content

iOS 14,iPadOS,对 UIView 使用 qmui_layoutSubviewsBlock,对一个设置了 inputAccessoryView 的输入框聚焦会出现死循环 #1247

Description

@CloudlessMoon

Bug 表现
iPadOS,开启悬浮键盘的情况下,UIView使用qmui_layoutSubviewsBlock,会造成循环调用

截图
图片
图片
「_UIPopoverStandardChromeView」还有几个系统私有类一直不停的循环调用layoutSubviews

如何重现

  1. 重要:开启iPad悬浮键盘模式
  2. UITextView设置self.textView.inputAccessoryView = UIView.new;
  3. 「UIView」(注意不能是子类,只能是UIView类)使用qmui_layoutSubviewsBlock,例如:self.view.qmui_layoutSubviewsBlock = ^(__kindof UIView *view) {};

此DEMO中,QDTextViewController的58行做了测试代码,运行DEMO,进入QDTextViewController,点击输入框即可复现
QMUIDemoTest.zip

其他信息

  • 设备: [iPad]
  • iOS 版本: [iOS 14.5]
  • Xcode 版本: [Xcode 12.5]
  • QMUI 版本: [4.2.3]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions