To run the example project, clone the repo, and run pod install
from the Example directory first.
Swift 3.0 Xcode 8.0
SAAlertView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SAAlertView'
//Alert with title
SAAlertView.alertView("Alert Title")
//Alert with title and message
SAAlertView.alertView("Warning", message: "type you message here")
//Alert with single button action
SAAlertView.alertView("Waring", message: "type your message", buttonTitle: "retry", buttonAction: reload)
//Alert with multiple buttons
SAAlertView.multipleAlertView(title: "Question",message:"select a option",buttonTitles:["a","b","c","d","a","b","c","d"]) { (indexOfButton) in
if indexOfButton == 0{
print("a")
}
else if indexOfButton == 1{
print("b")
}else{
print("button clicked")
}
}
//ActionSheet with multiple buttons
SAAlertView.actionSheet(title: "options",buttonTitles:["a","b","c","d","a","b","c","d"]) { (indexOfButton) in
if indexOfButton == 0{
print("a")
}
else if indexOfButton == 1{
print("b")
}else{
print("button clicked")
}
}
}
SAAlertView is available under the MIT license. See the LICENSE file for more info.