I am writing a simple note app that consists of a navigation controller. The root view has a table view, which when clicked on, pushes to a second view. The name of the row clicked would then be passed to the second view controller and used as the title in the nav bar.
我正在编写一个由导航控制器组成的简单的笔记应用程序。根视图有一个表视图,当单击该视图时,将推到第二个视图。点击的行名将被传递给第二个视图控制器,并作为导航栏中的标题。
Right now, when I run the code, the app reaches a breakpoint
when I click on a table view item. The breakpoint
points to the second line from the bottom in the following prepareForSegue
method:
现在,当我运行代码时,当我单击表视图项时,应用程序将到达断点。断点从下面prepareForSegue方法的底部指向第二条线:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"showNote"])
{
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
// JAYShowNoteViewController *destViewController = segue.destinationViewController;
// destViewController.noteName = [allNotes objectAtIndex:indexPath.row];
JAYShowNoteViewController *destination = [segue destinationViewController];
destination.noteName = [allNotes objectAtIndex:indexPath.row];
}
}
I did a lot of searching and editing of my own, but I could not find a solution to this problem.
我自己做了很多搜索和编辑,但是我找不到解决这个问题的办法。
2 个解决方案
#1
1
Disable breakpoints from Xcode while you running the app. check below screen shot to disable the break points.
在运行app. check下面的屏幕快照时,禁用Xcode中的断点。
#2
2
BreakPoint is not an indicator of error , it use to check stepByStep flow of our running code.
断点不是错误的指示器,它用于检查运行代码的步进流。
You can disable your all breakPoint by clicking on that icon
您可以通过单击该图标来禁用所有断点
#1
1
Disable breakpoints from Xcode while you running the app. check below screen shot to disable the break points.
在运行app. check下面的屏幕快照时,禁用Xcode中的断点。
#2
2
BreakPoint is not an indicator of error , it use to check stepByStep flow of our running code.
断点不是错误的指示器,它用于检查运行代码的步进流。
You can disable your all breakPoint by clicking on that icon
您可以通过单击该图标来禁用所有断点