Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/104.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 线程1:信号SIGABRT:以NSException类型的未捕获异常终止_Ios_Swift_Sprite Kit_Sigabrt_Touchesbegan - Fatal编程技术网

Ios 线程1:信号SIGABRT:以NSException类型的未捕获异常终止

Ios 线程1:信号SIGABRT:以NSException类型的未捕获异常终止,ios,swift,sprite-kit,sigabrt,touchesbegan,Ios,Swift,Sprite Kit,Sigabrt,Touchesbegan,当我点击重新启动我创建的游戏时,我发现了这个错误。它在不同于GameSecene的单独场景中调用,并在ToucheSBegind()中编写。我的代码中缺少什么吗 这是: import SpriteKit class GameOver: SKScene { override init(size: CGSize) { super.init(size: size) ... } override func touchesBegan() { let reveal = S

当我点击重新启动我创建的游戏时,我发现了这个错误。它在不同于GameSecene的单独场景中调用,并在ToucheSBegind()中编写。我的代码中缺少什么吗

这是:

import SpriteKit
class GameOver: SKScene {
  override init(size: CGSize) {
    super.init(size: size)
    ...
  }
  override func touchesBegan() {
    let reveal = SKTransition.fadeWithDuration(0.5)
    let gameScene = GameScene(size: self.size)
    self.view!.presentScene(gameScene, transition: reveal)
  }
}





 _TFC13Penguin_Peril8GameOver12touchesBeganfS0_FTGVSs3SetCSo7UITouch_9withEventGSqCSo7UIEvent__T_ + 397
10  Penguin Peril                       0x0000000108a30cf2 _TToFC13Penguin_Peril8GameOver12touchesBeganfS0_FTGVSs3SetCSo7UITouch_9withEventGSqCSo7UIEvent__T_ + 98
11  SpriteKit                           0x000000010a835c4a -[SKView touchesBegan:withEvent:] + 941
12  UIKit                               0x000000010aa52894 -[UIWindow _sendTouchesForEvent:] + 308
13  UIKit                               0x000000010aa53691 -[UIWindow sendEvent:] + 865
14  UIKit                               0x000000010aa05752 -[UIApplication sendEvent:] + 263
15  UIKit                               0x000000010a9e0fcc _UIApplicationHandleEventQueue + 6693
16  CoreFoundation                      0x000000010a0380a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17  CoreFoundation                      0x000000010a02dfcc __CFRunLoopDoSources0 + 556
18  CoreFoundation                      0x000000010a02d483 __CFRunLoopRun + 867
19  CoreFoundation                      0x000000010a02ce98 CFRunLoopRunSpecific + 488
20  GraphicsServices                    0x000000010e98dad2 GSEventRunModal + 161
21  UIKit                               0x000000010a9e6676 UIApplicationMain + 171
22  Penguin Peril                       0x0000000108a49afd main + 109
23  libdyld.dylib                       0x000000010cac092d start + 1
) libc++abi.dylib:以NSException类型的未捕获异常终止
(lldb)

查看Xcode底部的控制台。应该有更多的信息,我已经看过了。我想不出一个解决方案。你能发布控制台输出中显示的内容吗?包括在编辑中。