Hi,
I'm making an alarm-app and I came across a problem;
My equals code:
Whats in clockLabel:
testAlarm2:
I did that so that the time both will be displayed as ex. 08:15 AM, but it just doesn't seem to work even though they have the exact same text in them:
(The upper one is afLabel and the lower one is afLabel2)
I know this way probably isn't a good way, but I'm new so, yeah..
Thanks in advance!
I'm making an alarm-app and I came across a problem;
My equals code:
Code:
if(afLabel.text == afLabel2.text)
{
afLabel.text = @"!!!!!";
}
else{
afLabel.text = clockLabel.text;
afLabel2.text = testAlarm2.text;
}
Whats in clockLabel:
Code:
[formatter setDateFormat:@"hh:mm a"];
[clockLabel setText:[formatter stringFromDate:date]];
testAlarm2:
Code:
[testAlarm setText:[pickAlarm.date descriptionWithCalendarFormat:@"%I:%M %p" timeZone:nil locale:nil]];
I did that so that the time both will be displayed as ex. 08:15 AM, but it just doesn't seem to work even though they have the exact same text in them:
(The upper one is afLabel and the lower one is afLabel2)

I know this way probably isn't a good way, but I'm new so, yeah..
Thanks in advance!