tags:

views:

73

answers:

1

How to convert integer into hexadecimal value programmatically in iphone

Can anyone help me? Thanks in advance

+4  A: 

Here's one way:

int myInteger = 12345;
NSString* myString = [NSString stringWithFormat:@"%x", myInteger];

myString will contain what you've asked for, so it may help to elaborate on how you need to use the result.

Peter Elespuru
This is correct, assuming that what you were looking for is a method to display a string in hex format.
Amagrammer