Tencent / QMUI_iOS

QMUI iOS——致力于提高项目 UI 开发效率的解决方案

Home Page:http://qmuiteam.com/ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QMUIModalPresentationWindow没释放

weidongliu opened this issue · comments

Bug 表现
QMUIModalPresentationWindow没释放

截图
image

如何重现
使用QMUIAlertController弹窗后关闭

预期的表现
QMUIModalPresentationWindow释放掉

其他信息

  • Xcode 版本: [Xcode 14.3.1]
  • QMUI 版本: [4.4.3]

是不是你在contentViewBlock中引用了QMUIModalPresentationViewController,你可以将QMUIModalPresentationViewController弱引用,例如:

@weakify(modalViewController)
contentView.completeHandler = ^{
    @strongify(modalViewController)
    [modalViewController hideWithAnimated:YES completion:^(BOOL finished) {
        if (finished) {
            completeHandler();
        }
    }];
};

@RomanticEncounter 没有噢,我都没主动调用到QMUIModalPresentationViewController,使用方法就是这样
let controller = QMUIAlertController(title: nil, message: message, preferredStyle: .alert)
controller.showWith(animated: true)