我正在尝试添加一个动作到UIAlertAction,它可以直接打开蓝牙设置。
目前我可以打开设置,但有人能帮我将操作从“打开设置”更改为“打开蓝牙设置”吗?
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
NSLog(@"Geverifieerd");
NSURL *appSettings = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:appSettings];
}];谢谢
发布于 2015-05-26 15:49:14
根据this page from the Apple doc的说法,你没有什么可以做的,你必须相信用户会导航到蓝牙设置。
https://stackoverflow.com/questions/30422399
复制相似问题