<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

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

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

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

          代碼示例:

          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
          點贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  午夜精品99 | 日韩中出视频 | 天天看天天日 | 黄片在线看午夜 | 一本色道久久88亚洲综合加勒比 |