I have button in application i want that when user click on that button then it should show the unselected question labels text to red color
Only one lable text is changing of the Q1 only not the others.
-(IBAction)nextButtonClicked { if ([professionLabel.text isEqualToString:@"Profession"]) { errorLabel.text=@"Please Select the Highlighted Answers"; Q1.textColor=[UIColor redColor]; } else if ([workLabel.text isEqualToString:@"Work"]) { errorLabel.text=@"Please Select the Highlighted Answers"; Q2.textColor=[UIColor redColor]; } else if([yearLabel.text isEqualToString:@"Year"]) { errorLabel.text=@"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]; } }