実現したいこと
ボタンをタップして、設定画面に遷移をさせたいと思います。
iOS10と11に対応したいと思っています。
試したこと
https://gekkado.com/archives/590
https://stackoverflow.com/questions/46253781/ios-11-url-scheme-for-specific-settings-section-stopped-working
上記リンク等を参考に以下のようにコードを書きました。
import UIKit class ViewController: UIViewController { @IBAction func toConfig(_ sender: Any) { let url = URL(string: "app-settings:root=Privacy&path=LOCATION") UIApplication.shared.open(url!, options: [:], completionHandler: nil) } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } }