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

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -