Commit c1185b68 authored by Steven杜宇's avatar Steven杜宇

// UI

parent 07c68650
......@@ -17,10 +17,11 @@ class YHTwoOptionAlertView: UIView {
var rightButton: UIButton!
var leftButton: UIButton!
static func showAlertView(message:String?,leftBtnTitle:String? = "取消".local, rightBtnTitle:String? = "确认".local, callBack: @escaping Block) {
static func showAlertView(message:String?,leftBtnTitle:String? = "取消".local, rightBtnTitle:String? = "确认".local, aligentment:NSTextAlignment = .center, callBack: @escaping Block) {
let view = YHTwoOptionAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.messageLabel.text = message
view.messageLabel.textAlignment = aligentment
view.leftButton.setTitle(leftBtnTitle, for: .normal)
view.rightButton.setTitle(rightBtnTitle, for: .normal)
view.block = callBack
......@@ -100,8 +101,9 @@ class YHTwoOptionAlertView: UIView {
make.left.equalTo(22)
make.right.equalTo(-22)
}
leftButton.snp.makeConstraints { make in
make.top.equalTo(messageLabel.snp.bottom).offset(40)
make.top.equalTo(messageLabel.snp.bottom).offset(20)
make.left.equalTo(16)
make.bottom.equalToSuperview().offset(-16)
make.size.equalTo(CGSize(width: 128, height: 45))
......
......@@ -310,7 +310,7 @@ extension YHPrincipleUploadListVC {
} else if editType == .delete { // 删除
let msg = "您确定要删除文档\(model.name)吗?"
YHTwoOptionAlertView.showAlertView(message:msg) { sure in
YHTwoOptionAlertView.showAlertView(message:msg, aligentment:.left) { sure in
if !sure { return }
// 删除
var targetIndex:Int = -1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment