Find if current time is between a range

前端 未结 5 1663
孤城傲影
孤城傲影 2021-02-08 11:22

I can find how to get if a date is between a range, but I cant seem how to create a date at a specific time.

What would be the simplest way to see if [NSDate date] is be

5条回答
  •  既然无缘
    2021-02-08 11:46

    Use an NSCalendar instance to create a NSDateComponents instance out of your NSDate, then just check the hours, minutes and seconds property of the NSDateComponents and present the appropriate message.

提交回复
热议问题