gliubc
6/14/2018 - 3:08 AM

NS_ENUM

NS_ENUM

typedef NS_ENUM(NSInteger, SelectControlType) {
    SelectControlTypeProvince,
    SelectControlTypeCity,
    SelectControlTypeDistrict,
    SelectControlTypeSchool,
    SelectControlTypePeriod,
    SelectControlTypeSubject,
};


- (void)resetSelectControlWithType:(SelectControlType)type {
    switch (type) {
        case SelectControlTypeProvince:
            self.provinceUuid = @"";
            [self.btnProvince setTitle:@"请选择" forState:UIControlStateNormal];
        case SelectControlTypeCity:
            self.cityUuid = @"";
            [self.btnCity setTitle:@"请选择" forState:UIControlStateNormal];
        case SelectControlTypeDistrict:
            self.districtUuid = @"";
            [self.btnDistrict setTitle:@"请选择" forState:UIControlStateNormal];
        case SelectControlTypeSchool:
            self.schoolUuid = @"";
            [self.btnSchool setTitle:@"请选择" forState:UIControlStateNormal];
        case SelectControlTypePeriod:
            self.periodUuid = @"";
            [self.btnPeriod setTitle:@"请选择" forState:UIControlStateNormal];
        case SelectControlTypeSubject:
            self.subjectUuid = @"";
            [self.btnSubject setTitle:@"请选择" forState:UIControlStateNormal];
        default:
            break;
    }
}