I have this code where the value of shopOpenHour is @"0800" :
if([[shopOpenHour substringFromIndex: 2] isEqualToString: @"00"])
minute = 0;
else
minute = 30;
The if statement fails and hits the else statement instead. I have tried using braces around the if and else statements, but makes no difference.
What's wrong with the if statement?
Aucun commentaire:
Enregistrer un commentaire