DMActionController
DMActionController is customizable action sheet with an api that is base on UIKit's UIAlertController.
Usage
If you want to try it, simply run:
pod try DMActionController
- Presenting an action controller is straightforward, e.g:
let actionSheet = DMActionController(title: "My Action Sheet", message: "This is an action sheet.", preferredStyle: .table)
actionSheet.addAction(DMAction(title: "Do Action", style: .default, handler: { _ in
NSLog("The user tapped \"Do Action\" in the action sheet.")
}))
self.present(actionSheet, animated: true, completion: nil)
Examples
Table Style | Collection Style |
---|---|
Installation
DMActionController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DMActionController'
License
DMActionController is available under the MIT license. See the LICENSE file for more info.