ActionSheetController is an UIAlertController's APIs like ActionSheet control
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)
link |
Stars: 19 |
Last commit: 4 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics