TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jun 2016 |
SPMSupports SPM | ✗ |
Maintained by nohirap.
To run the example project, clone the repo, and run pod install
from the Example directory first.
ANActionSheet is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ANActionSheet"
Import ANActionSheet then use the following codes when you want to show the view.
let actionSheet = ANActionSheet(title: "Title", message: "Message!!!")
actionSheet.headerBackgroundColor = UIColor.blackColor()
actionSheet.titleColor = UIColor.redColor()
actionSheet.messageColor = UIColor.greenColor()
actionSheet.buttonsBorderColor = UIColor.blackColor()
let action1 = ANAction(title: "First Button", style: .Default) {
NSLog("Tap First Button!!!")
}
action1.buttonColor = UIColor.redColor()
action1.labelNumberOfLines = 3
actionSheet.addAction(action1)
let action2 = ANAction(title: "Second Button", style: .Default) {
NSLog("Tap Second Button!!!")
}
action2.buttonColor = UIColor.blueColor()
action2.labelColor = UIColor.greenColor()
actionSheet.addAction(action2)
let action3 = ANAction(title: "Third Button\nThird Button\nThird Button\nThird Button\nThird Button\nThird Button", style: .Default) {
NSLog("Tap Third Button!!!")
}
action3.buttonColor = UIColor.yellowColor()
actionSheet.addAction(action3)
let cancelAction = ANAction(title: "Cancel", style: .Cancel)
cancelAction.labelColor = UIColor.redColor()
actionSheet.addAction(cancelAction)
actionSheet.show()
nohirap, [email protected]
ANActionSheet is available under the MIT license. See the LICENSE file for more info.