Comparing an NSDate to [NSDate date]

前端 未结 3 1559
借酒劲吻你
借酒劲吻你 2021-02-08 06:05

I am trying to force a user to select a date in the future with a date picker. I obviously used the compare: method, however, when I do the following code, even if it\'s the sam

3条回答
  •  庸人自扰
    2021-02-08 07:03

    An NSDate object contains both a date AND a time, so there are MANY dates with the same day that can fall before or after another date with the same day.

    The date class method returns a date object with the current date day AND time.

提交回复
热议问题