swift-08 枚举

// 定义枚举
enum DaysofaWeek {
    case Sunday
    case Monday
    case TUESDAY
    case WEDNESDAY
    case THURSDAY
    case FRIDAY
    case Saturday
}

    // 枚举
    var weekDay = DaysofaWeek.THURSDAY
    weekDay = .Sunday
    print(weekDay)

你可能感兴趣的:(swift-08 枚举)