iOS 性别选择代码 storyboard


- (IBAction)genderSelect:(UIButton *)sender {
    if (sender.tag==0) {
        self.femaleBtn.enabled=YES;
        self.femaleBtn.backgroundColor=[UIColor clearColor];
        self.maleBtn.backgroundColor=[UIColor redColor];
        self.maleBtn.enabled=NO;
        
        
        
        
    }else{
        self.maleBtn.enabled=YES;
        self.femaleBtn.backgroundColor=[UIColor redColor];
        self.maleBtn.backgroundColor=[UIColor clearColor];
        self.femaleBtn.enabled=NO;
        
        
    }
    
}

你可能感兴趣的:(iOS 性别选择代码 storyboard)