diff --git a/SweetAlert/SweetAlert.swift b/SweetAlert/SweetAlert.swift index 52c18c8..6cb7d25 100644 --- a/SweetAlert/SweetAlert.swift +++ b/SweetAlert/SweetAlert.swift @@ -205,36 +205,30 @@ public class SweetAlert: UIViewController { self.contentView = UIView() } - public func showAlert(title: String) -> SweetAlert { + public func showAlert(title: String) { self.showAlert(title, subTitle: nil, style: .None) - return self } - public func showAlert(title: String, subTitle: String?, style: AlertStyle) -> SweetAlert { + public func showAlert(title: String, subTitle: String?, style: AlertStyle) { self.showAlert(title, subTitle: subTitle, style: style, buttonTitle: "OK") - return self - } - public func showAlert(title: String, subTitle: String?, style: AlertStyle,buttonTitle: String, action: ((isOtherButton: Bool) -> Void)? = nil) -> SweetAlert { + public func showAlert(title: String, subTitle: String?, style: AlertStyle,buttonTitle: String, action: ((isOtherButton: Bool) -> Void)? = nil) { self.showAlert(title, subTitle: subTitle, style: style, buttonTitle: buttonTitle,buttonColor: UIColor.colorFromRGB(0xAEDEF4)) userAction = action - return self } - public func showAlert(title: String, subTitle: String?, style: AlertStyle,buttonTitle: String,buttonColor: UIColor,action: ((isOtherButton: Bool) -> Void)? = nil) -> SweetAlert { + public func showAlert(title: String, subTitle: String?, style: AlertStyle,buttonTitle: String,buttonColor: UIColor,action: ((isOtherButton: Bool) -> Void)? = nil) { self.showAlert(title, subTitle: subTitle, style: style, buttonTitle: buttonTitle,buttonColor: buttonColor,otherButtonTitle: nil) userAction = action - return self } public func showAlert(title: String, subTitle: String?, style: AlertStyle,buttonTitle: String,buttonColor: UIColor,otherButtonTitle: - String?, action: ((isOtherButton: Bool) -> Void)? = nil) -> SweetAlert { + String?, action: ((isOtherButton: Bool) -> Void)? = nil) { self.showAlert(title, subTitle: subTitle, style: style, buttonTitle: buttonTitle,buttonColor: buttonColor,otherButtonTitle: otherButtonTitle,otherButtonColor: UIColor.redColor()) userAction = action - return self } public func showAlert(title: String, subTitle: String?, style: AlertStyle,buttonTitle: String,buttonColor: UIColor,otherButtonTitle: diff --git a/SweetAlert/ViewController.swift b/SweetAlert/ViewController.swift index 34ac7d4..72ece1a 100644 --- a/SweetAlert/ViewController.swift +++ b/SweetAlert/ViewController.swift @@ -10,7 +10,6 @@ import UIKit class ViewController: UIViewController { - var alert = SweetAlert() override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib.