ios设置蓝牙,跳转到设蓝牙页面
更新:HHH   时间:2023-1-7


  1. 添加框架CoreBluetooth.framewprk


  2. 在要跳转蓝牙设置界面添加类#import "CoreBluetooth/CoreBluetooth.h" 并声明代理<CBCentralManagerDelegate>

  3. 设置全局的控件@property (nonatomic, strong)CBCentralManager *cb;

  4. 在要跳转的地方写

    _cb = [[CBCentralManager alloc] initWithDelegate:self queue:nil];

  5. 若要获得蓝牙状态,实现代理方法

    -(void)centralManagerDidUpdateState:(CBCentralManager *)central

    {

    }

附件:http://down.51cto.com/data/2365284
返回移动开发教程...