iOS 用户权限处理 PermissionScope
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/nickoneill/PermissionScope
软件介绍
PermissionScope 是 Swift 框架,是智能 iOS 用户权限 UI 和统一 API,可以智能的处理用户权限请求。
代码示例:
class ViewController: UIViewController {
let pscope = PermissionScope()
override func viewDidLoad() {
super.viewDidLoad()
pscope.addPermission(PermissionConfig(type: .Contacts, demands: .Required, message: "We use this to steal\r\nyour friends"))
pscope.addPermission(PermissionConfig(type: .Notifications, demands: .Optional, message: "We use this to send you\r\nspam and love notes", notificationCategories: .None))
pscope.addPermission(PermissionConfig(type: .LocationInUse, demands: .Required, message: "We use this to track\r\nwhere you live"))
pscope.show()
}
@IBAction func doAThing() {
pscope.show(authChange: { (finished, results) -> Void in
println("got results \(results)")
}, cancelled: { (results) -> Void in
println("thing was cancelled")
})
}
}即将到来的场景时代
罗伯特•斯考伯、谢尔•伊斯雷尔 / 赵乾坤 周宝曜 / 北京联合出版公司 / 2014-5-1 / 42
科技大神、全球科技创新领域最知名记者 罗伯特·斯考伯:“技术越了解你,就会为你提供越多好处!” 互联网的炒作点一个一个不停出现,大数据、3D打印、O2O等,无不宣扬要颠覆商业模式。但是,互联网进入移动时代,接下来到底会发生什么?移动互联网时代真正带来哪些改变?这具体会怎样影响我们每一个人的生活?商业真的会被颠覆?目前为止没有一本书给出答案。 《即将到来的场景时代》不是就一个炒作点大加谈......一起来看看 《即将到来的场景时代》 这本书的介绍吧!

