1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        PermissionScopeiOS 用戶權(quán)限處理

        聯(lián)合創(chuàng)作 · 2023-09-27 15:15

        PermissionScope 是 Swift 框架,是智能 iOS 用戶權(quán)限 UI 和統(tǒng)一 API,可以智能地處理用戶權(quán)限請(qǐng)求。

        代碼示例:

        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")
                })
            }
        }
        瀏覽 22
        點(diǎn)贊
        評(píng)論
        收藏
        分享

        手機(jī)掃一掃分享

        編輯 分享
        舉報(bào)
        評(píng)論
        圖片
        表情
        推薦
        點(diǎn)贊
        評(píng)論
        收藏
        分享

        手機(jī)掃一掃分享

        編輯 分享
        舉報(bào)
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            94欧美| 中文字幕无码日韩专区免费 | 亚洲操逼图 | 色情网站免费观看 | 一级a性色生活片久久 | 搞逼片| 亚洲成人片网站 | 我给你日b小说 | 《性/生活3》未删减版 | 午夜怡春院 |