新功能概述以下是 sdl 2.0 中最重要的新功能: - 全3D 硬件加速 - 在各种配置文件中支持 opengl 3.0 + (核心、兼容性、调试、健壮等) - 支持 opengl es - 支持多个窗口 - 支持多显示器 - 支持多个音频设备 - 录音支持 - android 和 ios 支持 - Emscripten 和本地客户端支持 - 简单的2D 渲染 api, 可以
转载 5月前
27阅读
#系列:iOS开发-单例模式在我们做开发的时候经常会遇到需要在很多地方调用同一个对象的现象, 比如在一个类中,我们可能会用到全局变量,在一个方法中会重复用到某个局部变量…今天要说的单例模式就是一个类似这样的存在单例模式的作用 :可以保证在程序运行过程,一个类只有一个实例,而且该实例易于供外界访问,从而方便地控制了实例个数,并节约系统资源.单例模式的使用场合:在整个应用程序中,共享一份资源(这份资源
转载 2024-09-26 16:48:20
56阅读
背景: 需要把Linux下的C/C++代码移植到iOS平台下,iOS APP链接编译的静态库和动态库进行测试。工具准备:      mac一台      cmake      xcodegithub上有一个iOS版的Cmake编译工具链:ios-cmake 基于该Cmake编译工具链将C/C++代码编译成iOS平台可用的静态库或者动态库。编译进入/C/C++源码目录下,新建ios.toolchai
转载 2023-09-21 15:15:59
180阅读
iPhone4S设置主流邮箱的方法如下:  iPhone、iPod touch上有个很强大的邮件功能,可以实时接受邮件,对于商业化的邮箱来说,这个功能非常方便,以下就是各类邮箱的设置方法温馨提醒:在添加账户之前,如果iphone4S使用移动网络,请确认移动网络设置接入点为cmnet,cmwap的连接方式无法正常收发邮件(两种接入点的方式不同,运营商的资费也不同,详情可咨询当地运营商。)  联通3G
转载 2023-11-23 18:34:09
441阅读
### 实现`iOS触发centralManager:(CBCentralManager *)central didDisconnectPeripheral`的步骤 当一个外设(peripheral)与 iOS 设备建立的连接断开时,我们可以通过实现 `centralManager:didDisconnectPeripheral:error:` 方法来处理该事件。下面是实现该功能的步骤: 1.
原创 2023-07-10 08:21:11
599阅读
蓝牙使用流程图 Created with Raphaël 2.1.0 CBCentralManager CBCentralManager CBPeripheral CBPeripheral Service Service Characteristics
转载 2024-03-30 21:29:25
78阅读
1建立中心角色123#import CBCentralManager *manager; manager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; 2扫描外设(discover)[manager scanForPer...
转载 2015-11-23 11:40:00
77阅读
2评论
1建立中心角色123#import CBCentralManager *manager; manager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; 2扫描外设(discover)[manager scanForPer...
转载 2015-12-27 23:32:00
58阅读
2评论
首先导入框架 #import <CoreBluetooth/CoreBluetooth.h>我们需要一个管理者来管理蓝牙设备,CBCentralManager 首先创建管理者 self.manager = [[CBCentralManager alloc]initWithDelegate:self queue:[NSOperationQueue mainQueue] options:n
转载 2024-09-07 08:54:30
93阅读
1.创建中心设备,并设置代理一般情况下,手机是中心设备,蓝牙设备是外围设备。self.centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];1.创建之后,会进入到改变蓝牙状态的代理方法中。(void)centralManagerDidUpdateState:(CBCentralManager *)ce
转载 2023-08-28 15:07:50
1676阅读
代理方法 centralManagerDidUpdateState: peripheralManagerDidUpdateState:代理方法。   centralManager:willRestoreState peripheralManager:willRestoreState:代理方法   - (void)centralManager:(CBCentralManager *)central
转载 2016-01-10 10:50:00
170阅读
2评论
iOS蓝牙连接外设一堆代理方法的使用,在此分步骤按顺序梳理了一下,增加了接入的可读性和部分细节说明,详情会后附demo1.初始化CBCentralManager并设置代理<CBCentralManagerDelegate,CBPeripheralDelegate> self.theCentral = [[CBCentralManager alloc] initWithDelegate:
iOS蓝牙模块支持BLE4.0设备通讯。 在使用蓝牙的过程中,如果是iOS10及以上机型需要在info.plist文件中添加NSBluetoothPeripheralUsageDescription描述字段,向用户声明使用蓝牙的意图一、CBCentralManager 1. 初始化 CBCentralManager 对象用于扫描、发现、连接远程的外围设备。系统提供了两个初始化该类的方法
设备:中心设备(CBCentralManager):iOS系统的手机等设备外围设备(CBPeripheral):手环等第三方设备外围设备:服务: 外围
原创 2022-12-07 14:13:33
549阅读
蓝牙知识从零开始,摸索了一年多,做出了一堆比较渣的东西,觉得有些知识还是有必要记录一下的蓝牙4.0(低功耗蓝牙) 首先,官方的蓝牙API有几个比较重要的代理方法得实现:检测当前蓝牙状态,创建CBCentralManager管理类,遵循其代理时,就会触发以下的监听//检测当前蓝牙状态 - (void)centralManagerDidUpdateState:(CBCentralManager *)
// 扫描到外部设备后触发//多次调用的 - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(nonnull CBPeripheral *)peripheral advertisementData:(nonnull NSDictionary<NSString *,id> *)advertis
服务器端头文件#import <UIKit/UIKit.h> #import <CoreBluetooth/CoreBluetooth.h> @interface ViewController : UIViewController @property (strong,nonatomic) CBCentralManager *centralManager;//中心设备管理
     很多步骤来自网上,地址不记得了。  代码如下:     #import "ViewController.h" @interface ViewController () @property(nonatomic,strong)CBCentralManager *cbCentralMgr; @property(nonat
转载 2024-09-14 07:12:35
76阅读
# 实现BLE定向广播iOS ## 流程: | 步骤 | 操作 | | --- | --- | | 1 | 创建一个新的Xcode项目 | | 2 | 添加CoreBluetooth框架 | | 3 | 实现CBCentralManagerDelegate和CBPeripheralManagerDelegate协议 | | 4 | 初始化CBCentralManager和CBPeriphera
原创 2024-06-20 06:23:30
86阅读
添加框架CoreBluetooth.framewprk在要跳转蓝牙设置界面添加类#import "CoreBluetooth/CoreBluetooth.h" 并声明代理<CBCentralManagerDelegate>设置全局的控件@property (nonatomic, strong)CBCentralManager *cb;在要跳转的地方写_cb = [[CBCentralM
原创 2015-01-07 14:46:26
1511阅读
  • 1
  • 2
  • 3