Latest 3.2.0
Homepage https://github.com/cuzv/ActionSheetController
License MIT
Platforms ios 8.0, requires ARC
Dependencies ModalTransitioning
Authors

ActionSheetController is an UIAlertController’s APIs like ActionSheet control

How does it look like?

ActionSheetController ActionSheetController

How to use

let controller = ActionSheetController(cancelTitleColor: UIColor.blueColor())

let titles = ["发送给胖友", "收藏", "保存图片", "定位到聊天位置", "分享到微博", "复制链接", "复制图片"]
titles.forEach { (title) -> () in
    let action = SheetAction(title: title, handler: { (sender: SheetAction) -> Void in
        debugPrint("Taped: (sender.title)")
    })
    controller.addAction(action)
}

let action = SheetAction(title: "Plus", titleColor: UIColor.redColor())
controller.addAction(action)

presentViewController(controller, animated: true, completion: nil)

Notice

  • v0.x for swift 2.2
  • v1.x for swift2.3
  • v2.x for swift3.x
  • v3.x for swift4.x

Latest podspec

{
    "name": "ActionSheetController",
    "version": "3.2.0",
    "license": "MIT",
    "summary": "ActionSheetController is an UIAlertController's APIs like ActionSheet control.",
    "homepage": "https://github.com/cuzv/ActionSheetController",
    "authors": {
        "Roy Shaw": "[email protected]"
    },
    "source": {
        "git": "https://github.com/cuzv/ActionSheetController.git",
        "tag": "3.2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Sources/*.swift",
    "requires_arc": true,
    "dependencies": {
        "ModalTransitioning": [
            "~> 4.0"
        ]
    }
}

Pin It on Pinterest

Share This