I'm converting some working Objective-c code to Swift. It's all ported but I'm getting an error on this line:
var components = calendar.components(NSCalendarUnit.MinuteCalendarUnit, fromDate: start, toDate: end, options: 0)
It tells me toDate
is an extra argument but the method was generated by code completion so I'm sure it's correct.