Visual_Novel_iOS/crush/Crush/Src/Components/UI/Alert/AlertCL.swift

26 lines
1.0 KiB
Swift
Raw Normal View History

2025-10-09 10:29:35 +00:00
//
// AlertCL.swift
// Crush
//
// Created by Leon on 2025/8/4.
//
extension Alert{
class func showAIRoleCreateSuccessAlert(cancelAction: @escaping () -> Void, confirmAction: @escaping () -> Void){
let content = "Please confirm that the virtual character is your original or fan creation and does not infringe on others' images, IP or other rights."
let alert = Alert(title: "", text: content, image: UIImage(named: "logo_ai_role")!)
alert.titleBGview.isHidden = true
// alert.imageView.snp.updateConstraints { make in
// make.size.equalTo(CGSize(100, 100))
// make.top.equalToSuperview().offset(24)
// }
alert.masTopToImageBgForImageView?.update(offset: 24)
let confirm = AlertAction(title: "Confirm", actionStyle: .confirm, block: confirmAction)
let cancel = AlertAction(title: "Cancel", actionStyle: .cancel, block: cancelAction)
alert.addAction(confirm)
alert.addAction(cancel)
alert.show()
alert.layoutIfNeeded()
}
}