ios - I am getting hex value in string <0000000a>? How can i convert it into integer in objective-c? -
first have convert hex <> generates exception when trying convert integer
nsstring *steps =characteristic.value; int value2= [steps intvalue];
first have removce <>, convert hexadecimal string integer value.
nsstring *strval = [[nsstring alloc] initwithdata:characteristic.value encoding:nsutf8stringencoding]; int intvalue = strval.intvalue;
Comments
Post a Comment