Skip to content

Instantly share code, notes, and snippets.

@hacha
Created February 24, 2014 13:36
Show Gist options
  • Save hacha/9188552 to your computer and use it in GitHub Desktop.
Save hacha/9188552 to your computer and use it in GitHub Desktop.
NSMutableDataに対して4byte長の数値データ出力って、こういうことでいいのかな?
NSMutableData *data = [[[NSMutableData alloc] initWithLength:0] autorelease];
int test = 1;
[data appendData:[NSData dataWithBytes:&test length:sizeof(test)]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment