我已经在应用程序按钮,我想,当该按钮的用户点击,那么它应该显示未选择的问题标签文本红色更改按钮的的UILabel文本颜色单击
只有一个拉布勒文本改变Q1的只有其他人没有。
-(IBAction)nextButtonClicked { if ([professionLabel.text isEqualToString:@"Profession"]) { [email protected]"Please Select the Highlighted Answers"; Q1.textColor=[UIColor redColor]; } else if ([workLabel.text isEqualToString:@"Work"]) { [email protected]"Please Select the Highlighted Answers"; Q2.textColor=[UIColor redColor]; } else if([yearLabel.text isEqualToString:@"Year"]) { [email protected]"Please Select the Highlighted Answers"; Q3.textColor=[UIColor redColor]; } else { [self submitSurveyAnswers]; [self submitSurveyAnswersOne]; [self submitSurveyAnswersTwo]; OnlineViewController*targetController=[[OnlineViewController alloc]init]; targetController.mynumber=mynumber; [self.navigationController pushViewController:targetController animated:YES]; } }
首先明确你的基本概念... – Buntylm