3

So I am getting a thread error Thread 1: Breakpoint 1.1 in my IBAction function. The code runs without error, but when I click the button on the simulator, the simulator crashes and produces the breakpoint error. The affected code is:

-(IBAction)ChangeView:(id)sender{
SecondView = [[SecondViewController alloc] initWithNibName:@"SecondViewController" 
bundle:nil];
[self.view addSubview:SecondView.view];}

I have three other IBActions on the same class which work fine. I also defined in the h file as well.

-(IBAction)ChangeView:(id)sender;

I don't have much experience with thread errors and getting a bit frustrated trying to fix this problem. Any help is appreciated.

Thanks

Ashan Marla
  • 1,371
  • 2
  • 10
  • 8
  • what's the actual error message? only thing we can tell it could be from your code is that you don't declare `SecondView` anywhere. – Jesse Naugher May 08 '12 at 02:54

1 Answers1

5

Sounds like you have a breakpoint set on your function. Follow the instructions on this Stack Overflow question to remove the breakpoints.

I don't think your simulator is crashing, I think the execution is just pausing. You should be able to continue by hitting the play button or typing "c" in the console.

Community
  • 1
  • 1
Aaron Brager
  • 65,323
  • 19
  • 161
  • 287