07-18-2023, 04:06 PM
I´m following along with the [Bloc.io Swiftris tutorial](
lastTick = NSDate.date()
Which causes a compile error:
'date()' is unavailable: use object construction 'NSDate()'
Which should equal:
NSDate *lastTick = [NSDate date];
(from the [NSDate reference](
Did Apple change the [Swift interface to NSDate](
Is this just NSDate or can you not call type methods for any Objective-C APIs?
[To see links please register here]
) where they initialize a date by:lastTick = NSDate.date()
Which causes a compile error:
'date()' is unavailable: use object construction 'NSDate()'
Which should equal:
NSDate *lastTick = [NSDate date];
(from the [NSDate reference](
[To see links please register here]
))Did Apple change the [Swift interface to NSDate](
[To see links please register here]
), since I have seen other examples that use `NSDate.date`?Is this just NSDate or can you not call type methods for any Objective-C APIs?