検証を行いたいin Multiple dynamic
ラジオ ボタン. I want to check
ラジオ ボタンis
が選択されているかどうか。選択されていない場合はアラートを表示し、選択してから別のものに移動します。
私が使用する次のコード..
-(IBAction)btnNextClicked:(id)sender{
if ([appDelegate.questions count]> i) {
for (UIButton *btn in self.view.subviews)
{
if ([btn isKindOfClass:[UIButton class]])
{
if (btn.selected)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"BizVibe" message:@"Please select answer" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alert show];
[alert release];
return;
}
else{
for (int k=0; k<[[[appDelegate.questions objectAtIndex:i-1] objectForKey:[[appDelegate.questions objectAtIndex:i-1] objectForKey:@"question"]] count]; k++) {
for (UILabel *lbl in self.view.subviews)
{
if ([lbl isKindOfClass:[UILabel class]])
{
if (lbl.tag==k)
{
[lbl removeFromSuperview];
}
}
}
for (UIButton *btn in self.view.subviews)
{
if ([btn isKindOfClass:[UIButton class]])
{
if (btn.tag==k)
{
[btn removeFromSuperview];
}
}
}
}
[self LoadQuestionAnswer];
return;
}
}
}
}
else{
Term_para *termMSP = [[Term_para alloc]init];
[self.navigationController pushViewController:termMSP animated:YES];
[termMSP release];
}
}
私に何ができるか教えてください。
前もって感謝します..