diff --git a/Sources/SDSKit/Component/Alert/SDS-UIView+.swift b/Sources/SDSKit/Component/Alert/SDS-UIView+.swift index c1a23e4..23f02a3 100644 --- a/Sources/SDSKit/Component/Alert/SDS-UIView+.swift +++ b/Sources/SDSKit/Component/Alert/SDS-UIView+.swift @@ -5,7 +5,7 @@ import SnapKit public extension UIView { func showAlert(title: String? = nil, - message: String, + message: String? = nil, cancelButtonMessage: String? = nil, okButtonMessage: String, type: SDSAlertType) -> AlertView { diff --git a/Sources/SDSKit/Component/Alert/SDSAlert.swift b/Sources/SDSKit/Component/Alert/SDSAlert.swift index f93d1a2..e9ad9a1 100644 --- a/Sources/SDSKit/Component/Alert/SDSAlert.swift +++ b/Sources/SDSKit/Component/Alert/SDSAlert.swift @@ -77,7 +77,7 @@ public class AlertView: UIView { // MARK: - Life Cycle public init(title: String? = nil, - message: String, + message: String? = nil, cancelButtonMessage: String? = nil, okButtonMessage: String, type: SDSAlertType) { @@ -92,7 +92,13 @@ public class AlertView: UIView { else { titleLabel.text = title } - messageLabel.text = message + if message == nil { + messageLabel.isHidden = true + } + else { + messageLabel.text = message + } +// messageLabel.text = message if cancelButtonMessage == nil { cancelButton.isHidden = true }