开发者

Separate NSData into smaller NSMutableData objects

开发者 https://www.devze.com 2022-12-18 23:12 出处:网络
I am unsure of how to separate a NSData object into smaller parts so that I can send it over bluetooth. I believe it is a method similar to this:

I am unsure of how to separate a NSData object into smaller parts so that I can send it over bluetooth. I believe it is a method similar to this:

- (void)getBytes:(void *)buffer range:(NSRange)range

I do not know what to开发者_运维百科 pass in for the buffer. Do I just pass in a NSMutableData object to hold the bytes that I pull out of the original NSData?

Thanks


You can use the -subdataWithRange: method.

0

精彩评论

暂无评论...
验证码 换一张
取 消