-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
OHFinancialServices/Classes/Tools/Public/PublicAlertController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// PublicAlertController.swift | ||
// OHFinancialServices | ||
// | ||
// Created by hoomsun on 2019/6/13. | ||
// Copyright © 2019 hoomsun. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class PublicAlertController: NSObject { | ||
/// 正常弹框展示信息(有确认和取消) | ||
class func showAlertController(title:String?,message:String?,preferredStyle:UIAlertController.Style,sureAction:String?,cancleAction:String?,handler:((UIAlertAction)->Void)?,finishedBack:((UIAlertController)->())?) { | ||
let alertController = UIAlertController(title: title, message: message, preferredStyle: preferredStyle) | ||
let doAction = UIAlertAction(title: sureAction, style: .default, handler: handler) | ||
let cancleAction = UIAlertAction(title: cancleAction, style: .cancel, handler: nil) | ||
alertController.addAction(doAction) | ||
alertController.addAction(cancleAction) | ||
finishedBack!(alertController) | ||
} | ||
/// 只有一个确认按钮的框 | ||
class func showOneSureButtonAlertControlle(title:String?,message:String?,sureAction:String?,handler:((UIAlertAction)->Void)?,finishedBack:((UIAlertController)->())?) { | ||
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) | ||
let doAction = UIAlertAction(title: sureAction, style: .default, handler: handler) | ||
alertController.addAction(doAction) | ||
finishedBack!(alertController) | ||
} | ||
} |