我想点击一个按钮打开蓝牙设置页面。目前,它正在打开常规页面。如何在ios9上按下按钮时打开蓝牙设置?
我做以下为:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Bluetooth"]];
我想点击一个按钮打开蓝牙设置页面。目前,它正在打开常规页面。如何在ios9上按下按钮时打开蓝牙设置?
我做以下为:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Bluetooth"]];
现在你只能打开当前应用程序的设置,对不起..... https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS8.html
您可以通过
BluetoothManager *manager = [BluetoothManager sharedInstance];
[manager setEnabled:![manager enabled]];
开启/关闭蓝牙
从iOS9你可以opne设置应用程序,但我不认为你可以直接打开蓝牙窗口。对于开放设置,您可以使用'UIApplicationOpenSettingsURLString' –
请检查本答案------> http://stackoverflow.com/a/34024467/475978 –