let currentDayOfWeek = NSCalendar.currentCalendar().component(.CalendarUnitWeekday, fromDate: NSDate())
In this place I get an error:
NSCalendarUnit.Type
doesnt have a member namedCalendarUnitWeekDay
答案 0 :(得分:0)
它没有Weekday
,可以这样使用:
let calendar = NSCalendar.currentCalendar()
let component = calendar.component(.Weekday, fromDate:NSDate())