
效果
iOS8.0之前的跳轉(zhuǎn)方式是
UIApplication.shared.openURL(NSURL(string: "App-Prefs:root=MUSIC") as! URL)
8.0之后
UIApplication.shared.open(NSURL(string: App-Prefs:root=MUSIC)! as URL, options: [:],
completionHandler: {
(success) in
})
下面列出一個(gè)數(shù)組
let arr = ["tel:10086","telprompt://10010","sms://10086","mailto:421482590@qq.com","http://www.baidu.com","itms-apps://","wechat://","App-Prefs:root=MUSIC","App-Prefs:root=WIFI","App-Prefs:root=STORE"]
分別是手機(jī)號(hào),短信,郵件,網(wǎng)頁(yè),appStore,微信,系統(tǒng)設(shè)置等。
有些操作必須要在真機(jī)上測(cè)試。
下載鏈接見(jiàn):下載地址