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

ActionSheetController is an UIAlertController’s APIs like ActionSheet control

How does it look like?

 

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

Latest podspec

{
    "name": "ActionSheetController",
    "version": "2.1.2",
    "license": "MIT",
    "summary": "ActionSheetController is an UIAlertController's APIs like ActionSheet control.",
    "homepage": "https://github.com/cuzv/ActionSheetController",
    "authors": {
        "Moch Xiao": "[email protected]"
    },
    "source": {
        "git": "https://github.com/cuzv/ActionSheetController.git",
        "tag": "2.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Sources/*.swift",
    "requires_arc": true,
    "dependencies": {
        "PresentAnimatedTransitioningController": [
            "~> 2.0"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This