Xcode 4.3.2 IBAction 按钮线程 1:断点 1.1 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10491921/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:13:13  来源:igfitidea点击:

Xcode 4.3.2 IBAction button Thread 1: Breakpoint 1.1 error

iosxcode

提问by Ashan Marla

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 函数中收到线程错误 Thread 1: Breakpoint 1.1。代码运行没有错误,但是当我单击模拟器上的按钮时,模拟器崩溃并产生断点错误。受影响的代码是:

-(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.

我在同一个班级上还有其他三个 IBActions,它们工作正常。我也在 h 文件中定义了。

-(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

谢谢

回答by Aaron Brager

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

听起来您在函数上设置了断点。按照此 Stack Overflow 问题上的说明删除断点。

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.

我不认为你的模拟器崩溃了,我认为执行只是暂停。您应该能够通过点击播放按钮或在控制台中输入“c”来继续。