Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:49:00+00:00 2026-06-18T02:49:00+00:00

I have three question with radio button i want that user may give answer

  • 0

I have three question with radio button i want that user may give answer of all theree withu that it should not move to next screen so i have declared a BOOL isClicked
and make it true when all the buttons are clicked.

but it works when any of the buton is selected and it moves to next screen but it should check all three question button so i need to add differen bools for all the button or any thing else now i am doing like this

     -(IBAction)button1Action{


UIImage *img = [UIImage imageNamed:@"selected.png"];
UIImage *img1=[UIImage imageNamed:@"unselected.png"];
[button1 setImage:img forState:UIControlStateNormal];
[button2 setImage:img1 forState:UIControlStateNormal];
[button3 setImage:img1 forState:UIControlStateNormal];
    option1=@"Less than 2 hours";

isClicked = YES;
}
   -(IBAction)button2Action{


UIImage *img = [UIImage imageNamed:@"selected.png"];
UIImage *img1=[UIImage imageNamed:@"unselected.png"];
[button1 setImage:img1 forState:UIControlStateNormal];
[button2 setImage:img forState:UIControlStateNormal];
[button3 setImage:img1 forState:UIControlStateNormal];



option2=@"2-5 hours";

isClicked = YES;

}


   -(IBAction)button3Action{

UIImage *img = [UIImage imageNamed:@"selected.png"];
UIImage *img1=[UIImage imageNamed:@"unselected.png"];
[button1 setImage:img1 forState:UIControlStateNormal];
[button2 setImage:img1 forState:UIControlStateNormal];
[button3 setImage:img forState:UIControlStateNormal];
option3=@"More than 5 hours";

isClicked = YES;

}



   if (isClicked) {


    [self save_Local];


    SecondViewController*targetController=[[SecondViewController alloc]init];

    targetController.responseOne=responseOne;
    targetController.responseTwo=responseTwo;
    targetController.responseThree=responseThree;
    targetController.responseFour=responseFour;
    targetController.teritory=teritory;


    [self.navigationController pushViewController:targetController animated:YES];



}

else {





    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Please provide all responses before proceeding to the next screen" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alert show];
    [alert release];



}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:49:02+00:00Added an answer on June 18, 2026 at 2:49 am

    in this scenario you may add three different boolean values or instead you may check this by adding a counter. Increment counter when you get answer. and then you can replace your current if statement by if(noOfclicks > MIN_ANSWERS_REQUIRED) where noOfClicks will be your counter and MIN_ANSWERS_REQUIRED will be 3 in your case.

    Or

    As you said these are answers, so you must be assigning value for it in some variable. You can assign this variable a default value which is not from the answers. Then when user clicks for navigating to next screen, check if all answers have different value than default value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table like this, with three fields: User | Question# | Answer
I have a three part question based on a dataframe (df is example rows)
As per the title I have three parts to this question... Is db4o object
My question is related to exception handling. If i have for example three methods
A very simple question. I have a html page which is divided into three
I have seen there is no question that specifically reply to this combination of
I have a job interview tomorrow and I'm trying to answer this question: There
I have Question and QuestionTypes. In Question table there is a foreign key that
I have a simple HTML form which consists of radio buttons where user has
Morning all...thicky, newbie Rich here! I have a very simple set up, three different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.