I am currently working on an app that shows the current weather. I get my response from openweathermap.org and in json. In the json response I receive all kinds of data concerning the weather; temperature, windSpeed, humidity and conditions.
What I want to do is interpret that data into text. For example I´m doing this now:
if [weater.temperature] <=-5.0f && [weather.humidity] <=80.0f && [weather.condition] isEqual:@"Snow")
label setText....
The problem is that I have to repeat myself all the time and there a a lot of else ifs and also the statements exclude each other, for example if I want to have the label print something if it´s 5 degrees and 80& relative humidity and something else if the conditions are the same but it´s snowing.
Is there some other better solution to do this??