QMUI_iOS icon indicating copy to clipboard operation
QMUI_iOS copied to clipboard

QMUIToastView在layoutSubviews里self.frame = self.parentView.bounds,有可能会造成循环调用

Open jiasongs opened this issue 4 years ago • 2 comments

Bug 表现 QMUIToastView在layoutSubviews里self.frame = self.parentView.bounds,有可能会造成循环调用

截图

如何重现

  1. 将QMUIToastView加到viewContoller.view上,在viewDidLayoutSubviews里改变QMUIToastView的frame

预期的表现 不会引起循环调用

其他信息

  • 设备: 模拟器
  • iOS 版本: iOS 14
  • Xcode 版本: [Xcode 12.3]
  • QMUI 版本: [4.2.2]

jiasongs avatar Jan 19 '21 08:01 jiasongs

Bug 表现 QMUIToastView在layoutSubviews里self.frame = self.parentView.bounds,有可能会造成循环调用

截图

如何重现

  1. 将QMUIToastView加到viewContoller.view上,在viewDidLayoutSubviews里改变QMUIToastView的frame

预期的表现 不会引起循环调用

其他信息

  • 设备: 模拟器
  • iOS 版本: iOS 14
  • Xcode 版本: [Xcode 12.3]
  • QMUI 版本: [4.2.2]

selflayoutSubviews: [self setFrame] 会触发 selflayoutSubviews: ... 不循环调用才奇怪咧....

codingiran avatar Jan 21 '21 06:01 codingiran

后续重构 QMUITips 组件,这个问题暂不处理。

MoLice avatar Mar 29 '21 14:03 MoLice