我有一个2vcs。主要 vc 是 *ViewController 和其他 *Questions。开始按钮在将我带到 Questions.vc 时效果很好,但是当我尝试从 Questions.vc 返回 ViewController.vc 时应用程序崩溃。Quit 按钮在 Questions.H 中声明,并且该按钮已链接,但是一旦我 b&r 并点击退出按钮,应用程序就会崩溃。
打开所有异常断点后。它显示了 10 个断点,其中 3 个被禁用。这些是代码行: Questions.H 所有这三行
`
-(IBAction)OphthalmicInstruments:(id)sender;
-(IBAction)Lenses:(id)sender;
-(IBAction)Transposition:(id)sender;
`
Questions.M(蓝色箭头指向空格b/t这两行`
-(IBAction)OphthalmicInstruments:(id)sender{
Cat1.hidden = YES;
` Questions.M Lines with blue arrow Case 2 Answer 3 & Case 3 Wrong 4
`
case 2:
Question.text = [NSString stringWithFormat:@"A tonometer measures:"];
Right3.hidden = NO;
Wrong2.hidden = NO;
Wrong3.hidden = NO;
Wrong4.hidden = NO;
Answer1.text = [NSString stringWithFormat:@"Interpupillary distance"];
Answer2.text = [NSString stringWithFormat:@"Vertex distance"];
Answer3.text = [NSString stringWithFormat:@"Intraocular pressure"];
Answer4.text = [NSString stringWithFormat:@"Basecurve"];
break;
case 3:
Question.text = [NSString stringWithFormat:@"A lens clock measures:"];
Right4.hidden = NO;
Wrong2.hidden = NO;
Wrong3.hidden = NO;
Wrong4.hidden = NO;
Answer1.text = [NSString stringWithFormat:@"Interpupillary distance"];
Answer2.text = [NSString stringWithFormat:@"Vertex distance"];
Answer3.text = [NSString stringWithFormat:@"Intraocular pressure"];
Answer4.text = [NSString stringWithFormat:@"Basecurve"];
break;
` Questions.M 行:break & case 8 行都有蓝色箭头
`
case 7:
Question.text = [NSString stringWithFormat:@"The power of a lens is measured in
_____."];
Right4.hidden = NO;
Wrong2.hidden = NO;
Wrong3.hidden = NO;
Wrong4.hidden = NO;
Answer1.text = [NSString stringWithFormat:@"Millimeters"];
Answer2.text = [NSString stringWithFormat:@"Inches"];
Answer3.text = [NSString stringWithFormat:@"Nanometers"];
Answer4.text = [NSString stringWithFormat:@"Diopters"];
break;
case 8:
Question.text = [NSString stringWithFormat:@"A lens with a power of 1 Diopter has a focal length of _____."];
`