简体   繁体   English

单击选项卡栏控制器时,应用程序崩溃

[英]App Crashes when I click Tab Bar Controller

I'm working my way through Stanford's iOS 7 course and I'm stuck at Task 1 on Assignment 4. 我正在通过斯坦福大学的iOS 7课程进行学习,但仍处于作业4的任务1上。

I linked two scenes via CTRL + click to a Tab Bar Controller. 我通过CTRL +单击将两个场景链接到选项卡栏控制器。 I'll call them Scene A and Scene B. 我称它们为场景A和场景B。

If I link Scene A first, the app loads and does what it's supposed to...until I click the tab for Scene B, at which point the app crashes with the following exception: 如果我首先链接场景A,则该应用程序将加载并执行应有的操作...直到单击场景B的选项卡,这时该应用程序崩溃,但出现以下异常:

2014-06-25 13:31:12.255 Matchismo[4976:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSRegularExpression enumerateMatchesInString:options:range:usingBlock:]: nil argument'

If I link Scene B first, the app crashes out of the gate, despite no compiler errors. 如果我先链接场景B,尽管没有编译器错误,该应用程序也会崩溃。 Both scenes have a view controller set for them. 这两个场景都为它们设置了一个视图控制器。 Scene B's view controller is a subclass of Scene A's view controller. 场景B的视图控制器是场景A的视图控制器的子类。

Where should I be looking for the problem? 我应该在哪里寻找问题?

Always post the error message with your question. 始终将错误消息与您的问题一起发布。 Did you google your error? 您是否用Google搜索了错误? Follow this link, 点击此链接,

NSRegularExpression enumerateMatchesInString:options:range:usingBlock: giving a null result? NSRegularExpression enumerateMatchesInString:options:range:usingBlock:给出空结果吗?

I believe your error is not related to your tab view controller, but what's inside your view B. They're not empty, right? 我相信您的错误与您的标签视图控制器无关,但是视图B里面有什么。它们不是空的,对不对?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM