Easy to use customised action sheet picker inspired by UIAlertController
Use CocoaPods.
pod 'SBAActionSheetPicker'
Create SBAActionSheetPicker
controller
let actionSheetPicker = SBAActionSheetPicker.create(.white) as SBAActionSheetPicker
Create SBAAction
actions
let action1 = SBAAction.init(title: "Accessibility", image: UIImage.init(named: "accessibility"),color: .black) { (action) in
print("Accessibility")
}
let action2 = SBAAction.init(title: "Acount Balance", image: UIImage.init(named: "account_balance"),color: .black) { (action) in
print("Acount Balance")
}
let action3 = SBAAction.init(title: "Close", image: UIImage.init(named: "close"),color: .black) { (action) in
print("Close")
}
Set SBAAction
actions array to SBAActionSheetPicker
and prensent it
actionSheetPicker.addActions(actions: [action1,action2,action3])
self.present(actionSheetPicker, animated: false, completion: nil)
Congratulations! You're done.
SBAActionSheetPicker is under MIT. See LICENSE file for more info.