UI進階 跳轉系統設定相關介面的方法,ui進階

來源:互聯網
上載者:User

UI進階 跳轉系統設定相關介面的方法,ui進階

跳轉系統設定介面,例如提示使用者開啟定位、藍芽或者WIFI,提醒使用者開啟推送或者位置許可權等

在iOS6之後,第三方應用需要跳轉系統設定介面,需要在URL type中添加一個prefs值,如:

跳轉系統設定根目錄中的項目使用下面的方法

 1          _array = @[ 2                @{@"系統設定":@"prefs:root=INTERNET_TETHERING"}, 3                @{@"WIFI設定":@"prefs:root=WIFI"}, 4                @{@"藍芽設定":@"prefs:root=Bluetooth"}, 5                @{@"系統通知":@"prefs:root=NOTIFICATIONS_ID"}, 6                @{@"通用設定":@"prefs:root=General"}, 7                @{@"顯示設定":@"prefs:root=DISPLAY&BRIGHTNESS"}, 8                @{@"壁紙設定":@"prefs:root=Wallpaper"}, 9                @{@"聲音設定":@"prefs:root=Sounds"},10                @{@"隱私權設定":@"prefs:root=privacy"},11                @{@"APP Store":@"prefs:root=STORE"},12                @{@"Notes":@"prefs:root=NOTES"},13                @{@"Safari":@"prefs:root=Safari"},14                @{@"Music":@"prefs:root=MUSIC"},15                @{@"photo":@"prefs:root=Photos"}16                ];17         NSURL * url = [NSURL URLWithString:[_array[index] allValues].firstObject];18         [[UIApplication sharedApplication]openURL:url];

如果要跳轉第三方應用的設定介面中,使用prefs:root=boundleId的方式,boundleId是第三方應用的boundleId。
如果需要繼續向項目內層進行跳轉,可以通過添加path路徑的方式,如下:

 1              _array = @[ 2                @{@"關於本機":@"prefs:root=General&path=About"}, 3                @{@"軟體升級":@"prefs:root=General&path=SOFTWARE_UPDATE_LINK"}, 4                @{@"日期時間":@"prefs:root=General&path=DATE_AND_TIME"}, 5                @{@"Accessibility":@"prefs:root=General&path=ACCESSIBILITY"}, 6                @{@"鍵盤設定":@"prefs:root=General&path=Keyboard"}, 7                @{@"VPN":@"prefs:root=General&path=VPN"}, 8                @{@"壁紙設定":@"prefs:root=Wallpaper"}, 9                @{@"聲音設定":@"prefs:root=Sounds"},10                @{@"隱私權設定":@"prefs:root=privacy"},11                @{@"APP Store":@"prefs:root=STORE"},12                @{@"還原設定":@"prefs:root=General&path=Reset"},13                @{@"應用通知":@"prefs:root=NOTIFICATIONS_ID&path=應用的boundleId"}14                ]; 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.