Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不确定如何将 NSData 对象分成更小的部分,以便我可以通过蓝牙发送它。我相信这是一种类似的方法:
- (void)getBytes:(void *)buffer range:(NSRange)range
我不知道要为缓冲区传递什么。我是否只是传入一个 NSMutableData 对象来保存我从原始 NSData 中提取的字节?
谢谢
您可以使用该-subdataWithRange:方法。
-subdataWithRange: