I heard about a function on NSCalendar
that had been introduced in iOS7.
Had a look in the docs and couldn't find it. Nor in the OS X docs.
The function is - (BOOL)isDate:(NSDate *)date1 equalToDate:(NSDate *)date2 toUnitGranularity:(NSCalendarUnit)unit
i.e. are these two dates on the same day/in the same week/ month, etc...
However, when I try to use it in Xcode 5. The AutoComplete shows it with a red strike through and then when I actually use it I get this error...
It's odd as the function is clearly there I'm just not able to use it.
Can anyone shed light on why this is happening?
Where did you hear about that method? It's possible that the method has been removed during the betas of iOS 7.
It's private API: __NSCFCalendar.h