That's quite simple. Use bytes
to get at the bytes and then cast to unsigned char*
unsigned char *n = [yourNSData bytes];
int value1 = n[0];
int value2 = n[1];
int value3 = n[2];
int value4 = n[3];
Update
To turn this into a single int
assumes bytes
contains a valid int
:
int result = *(int *)n;