I’m having issues with converting a hexadecimal number to an NSNumber. I tried a ton of things, but I can’t seem to work it out.
With something like the following, how can I get an NSNumber?
Byte test[4] = {0x00, 0x00, 0x1D, 0x7A}; // Expected result is 7546
NSData * testData = [NSData dataWithBytes:&test length:4];
// NSNumber = ...
NSScanner has the following methods
so you can scan a hex NSString representation. Discussion for the last one: