I’m trying to detect if the temperature is in-between two sets of numbers. i.e. 70 – 79
If its in that range, perform an action, in my case set a specific image. I’ve tried using rangeOfString: but it was only looking for a number anywhere. I need it to look inside of a 10 digit area like 70 – 79.
Here is what I have for the temperature code
NSString *temperature = [NSString stringWithFormat:@"%d", weather.temperature];
How would I take the string and search in-between 0-9, 10-19, 20-29…60-69, 70-79 etc etc etc?
If anyone can point me to an apple document or something I would greatly appreciate it.
Thanks
Since you appear to have it in the form of a number, why not just use integer comparison?