can we set the value of a radio button at runtime?
Suppose there are two radio buttons: Yes and No.
Suppose a user chooses Option1 from a drop down list, then Radio button Yes should be highlighted, if the user chooses Option 2 from the drop down list, then the Radio button No should be highlighted.
I am trying the following code but its not working:
if (option.rawValue == Option1)
{
radioButton1.rawValue = true;
}
else
{
radioButton2.rawValue = true;
}
Is it the rawValue property of radio button that I should use or something else?
I am really stuck on this. Any help would be highly appreciated