Title pretty much says everything.
would like to print (NOT in decimal), but in unsigned char value (HEX). example
unsigned char data[6] = {70,AF,80,1A, 01,7E};
NSLog(@"?",data); //need this output : 70 AF 80 1A 01 7E
Any idea? Thanks in advance.
There is no format specifier for an char
array. One option would be to create an NSData
object from the array and then log the NSData
object.
NSData *dataData = [NSData dataWithBytes:data length:sizeof(data)];
NSLog(@"data = %@", dataData);