@@ -38,23 +38,23 @@ final class BitnagilAlert: UIViewController {
3838 private let cancelButton = UIButton ( )
3939 private let confirmButton = UIButton ( )
4040 private let alertType : AlertType
41- private var cancelCompletionHandler : ( ( ) -> Void ) ?
42- private var confirmCompletionHandler : ( ( ) -> Void ) ?
41+ private var cancelHandler : ( ( ) -> Void ) ?
42+ private var confirmHandler : ( ( ) -> Void ) ?
4343
4444 init (
4545 alertType: AlertType ,
4646 title: String ,
4747 content: String ,
4848 cancelButtonTitle: String ,
4949 confirmButtonTitle: String ,
50- cancelCompletionHandler : ( ( ) -> Void ) ? ,
51- confirmCompletionHandler : ( ( ) -> Void ) ?
50+ cancelHandler : ( ( ) -> Void ) ? ,
51+ confirmHandler : ( ( ) -> Void ) ?
5252 ) {
5353 self . alertType = alertType
5454 super. init ( nibName: nil , bundle: nil )
5555
56- self . cancelCompletionHandler = cancelCompletionHandler
57- self . confirmCompletionHandler = confirmCompletionHandler
56+ self . cancelHandler = cancelHandler
57+ self . confirmHandler = confirmHandler
5858 titleLabel. text = title
5959 contentLabel. text = content
6060 cancelButton. setTitle ( cancelButtonTitle, for: . normal)
@@ -97,14 +97,14 @@ final class BitnagilAlert: UIViewController {
9797
9898 cancelButton. addAction (
9999 UIAction { [ weak self] _ in
100- self ? . cancelCompletionHandler ? ( )
100+ self ? . cancelHandler ? ( )
101101 self ? . dismiss ( animated: false )
102102 } ,
103103 for: . touchUpInside)
104104
105105 confirmButton. addAction (
106106 UIAction { [ weak self] _ in
107- self ? . confirmCompletionHandler ? ( )
107+ self ? . confirmHandler ? ( )
108108 self ? . dismiss ( animated: false )
109109 } ,
110110 for: . touchUpInside)
0 commit comments