QMUIModalPresentationWindow没释放
weidongliu opened this issue · comments
weidongliu commented
吃藕丑 commented
是不是你在contentView
的Block
中引用了QMUIModalPresentationViewController
,你可以将QMUIModalPresentationViewController
弱引用,例如:
@weakify(modalViewController)
contentView.completeHandler = ^{
@strongify(modalViewController)
[modalViewController hideWithAnimated:YES completion:^(BOOL finished) {
if (finished) {
completeHandler();
}
}];
};
weidongliu commented
@RomanticEncounter 没有噢,我都没主动调用到QMUIModalPresentationViewController,使用方法就是这样
let controller = QMUIAlertController(title: nil, message: message, preferredStyle: .alert)
controller.showWith(animated: true)