How can I display time as a number value for an if statement?
I’m trying to write an if statement where a set time is compared against my computed time for an event to occur. I just don’t know how to write that time as a value. how can I write a time like 10am as a set time value for example.
Any help is much appreciated.
You can use the NSDate class and the
timeIntervalSinceDate:method to compare the two times. You need to set up the two NSDate objects with the different times (and the same date) and then call that method to compare the two.