2012-03-22 101 views

回答

5
unsigned char mydata = 3; 
[NSMutableData dataWithBytes:&mydata length:sizeof(mydata)]; 

NSData的referenceunsigned char用於保存1個字節。

+0

謝謝,太棒了! – 2012-03-22 12:40:06