0

I´m would like to optimize my app - i just downloaded the crash log from the organizer. I got the following crash 3 times. Has everyone a idea, what´s wrong? enter image description here

Here is the code of the lines:

-(void)checkAnswer:(int)theAnswerValue {
    [holeView removeFromSuperview];
    [circleView removeFromSuperview];
    [self.circularProgressView removeFromSuperview];

    if(rightAnswer == theAnswerValue) {
    NSLog(@"Correct Answer");
    } else {
       NSLog(@"Wrong Answer");      
    }
    [self updateScore];
}

- (IBAction)buttonThree:(id)sender {
    audioPlayer = nil;
    NSInteger theAnswerValue = 3;
    [self checkAnswer:(int)theAnswerValue];
}

Would be great, if someone can help me out?! The regular order should be, that as soon as a button(Three) is pressed, the game should check the answer.

LJSven
  • 147
  • 3
  • 13
  • I think app crash due to removeFromSuperview. Please check your code again . May be its removeFromSuperview then its again try to update score in view – Santu C Jun 19 '15 at 05:57
  • This error don´t appear all the time. It´s quit difficult to fix this problem. What do you mean with "then its again try to update score in view"? If it´s removeToSuperview, the app should crash all the time, shouldn´t it? – LJSven Jun 19 '15 at 06:14
  • I think here sometime delay or something is work. I would like to suggest you instead of removeToSuperview , you may just hide and keep in observation if crash happen or not . – Santu C Jun 19 '15 at 06:21
  • Do you think it helps if I check if the exist before removing it? – LJSven Jun 19 '15 at 07:31

0 Answers0