尝试了解与此类似的其他问题,但无法弄明白。 Type of expression is ambigous without more context
在“CalendarUnitHour”上显示{&#39}。在这行代码中:
let components = calendar.components(.CalendarUnitHour | .CalendarUnitMinute | .CalendarUnitMonth | .CalendarUnitYear | .CalendarUnitDay, fromDate: date)