Iphone Simulator终止打开一个新的Table ViewController

时间:2016-10-04 11:19:44

标签: ios objective-c iphone

在我的应用程序中,我有一个按钮,从那里我打开了一个TableViewController,它的效果非常好。

现在我添加了另一个按钮,我将按钮链接到另一个TableViewController

enter image description here

现在当我点击这个新按钮时,我的应用程序崩溃了:

libc++abi.dylib: terminating with uncaught exception of type NSException

在StackOverflow的其他地方,他们提到了一个未关闭的IBOutlet,但是我没有为按钮本身创建任何插座,所以会出现什么问题。

记录:

*** First throw call stack:
(
    0   CoreFoundation                      0x000000010712f34b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x000000010677321e objc_exception_throw + 48
    2   CoreFoundation                      0x0000000107198265 +[NSException raise:format:] + 197
    3   UIKit                               0x000000010797383c -[UITableViewController loadView] + 638
    4   UIKit                               0x00000001076f3c4c -[UIViewController loadViewIfRequired] + 201
    5   UIKit                               0x00000001076f44a0 -[UIViewController view] + 27
    6   UIKit                               0x0000000107fb88d0 -[_UIFullscreenPresentationController _setPresentedViewController:] + 87
    7   UIKit                               0x00000001076ced26 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 141
    8   UIKit                               0x000000010770730b -[UIViewController _presentViewController:withAnimationController:completion:] + 3956
    9   UIKit                               0x000000010770a6df -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 530
    10  UIKit                               0x000000010770a1c5 -[UIViewController presentViewController:animated:completion:] + 179
    11  UIKit                               0x000000010770f892 -[UIViewController _showViewController:withAction:sender:] + 274
    12  UIKit                               0x0000000107bd41b6 __66-[UIStoryboardShowSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 134
    13  UIKit                               0x0000000107d2d40d -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 447
    14  UIKit                               0x0000000107d2d21d -[UIStoryboardSegueTemplate _perform:] + 82
    15  UIKit                               0x0000000107d2d4df -[UIStoryboardSegueTemplate perform:] + 156
    16  UIKit                               0x0000000107554b88 -[UIApplication sendAction:to:from:forEvent:] + 83
    17  UIKit                               0x00000001076da2b2 -[UIControl sendAction:to:forEvent:] + 67
    18  UIKit                               0x00000001076da5cb -[UIControl _sendActionsForEvents:withEvent:] + 444
    19  UIKit                               0x00000001076d94c7 -[UIControl touchesEnded:withEvent:] + 668
    20  UIKit                               0x00000001075c20d5 -[UIWindow _sendTouchesForEvent:] + 2747
    21  UIKit                               0x00000001075c37c3 -[UIWindow sendEvent:] + 4011
    22  UIKit                               0x0000000107570a33 -[UIApplication sendEvent:] + 371
    23  UIKit                               0x0000000107d62b6d __dispatchPreprocessedEventFromEventQueue + 3248
    24  UIKit                               0x0000000107d5b817 __handleEventQueue + 4879
    25  CoreFoundation                      0x00000001070d4311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    26  CoreFoundation                      0x00000001070b959c __CFRunLoopDoSources0 + 556
    27  CoreFoundation                      0x00000001070b8a86 __CFRunLoopRun + 918
    28  CoreFoundation                      0x00000001070b8494 CFRunLoopRunSpecific + 420
    29  GraphicsServices                    0x0000000109ebaa6f GSEventRunModal + 161
    30  UIKit                               0x0000000107552f34 UIApplicationMain + 159
    31  OneTest                             0x0000000105bfbc3f main + 111
    32  libdyld.dylib                       0x0000000108eef68d start + 1
)

这就是我所做的,我删除了新的TableViewcontroller。然后我添加了一个新的ViewController并通过制作Segue将此ViewController链接到我的Button。到同一个按钮,它通过打开新的ViewController工作。然后,只要我将新的View控制器链接到我的班级,它就会停止工作。可能的原因是什么?

0 个答案:

没有答案