Closed aitadeta1314 closed 4 years ago
let leftAction = QMUIAlertAction(title: "取消", style: .cancel, handler: nil) let rightAction = QMUIAlertAction(title: "保存", style: .default, handler: nil) let alertController = QMUIAlertController(title: "是否保存已更改的内容", message: nil, preferredStyle: .actionSheet) // alertController.alertCancelButtonAttributes = [NSAttributedString.Key.font: setRegularFont(size: 16), NSAttributedString.Key.foregroundColor: UIColor.skyBlueColor] // alertController.alertButtonAttributes = [NSAttributedString.Key.font: setSpecifiedFont(size: 16), NSAttributedString.Key.foregroundColor: UIColor.skyBlueColor] alertController.addAction(leftAction) alertController.addAction(rightAction) alertController.showWith(animated: true)
问题已解决,因为创建项目中没有删除sceneDelegate.swift文件,导致获取不到window;应该是库没有适配iOS13导致。请知悉