因此,从Xcode运行时,该应用程序可以在模拟器中和设备上正常运行。
一旦我断开手机与Mac的连接,然后重新运行,应用程序就会崩溃,并且我不知道这是什么问题。
这是我以编程方式填写的静态表格。
在行选择中,我执行了performSegue(withIdentifier:“ segueName”,发件人:cell)
所有的名称都已正确设置。 (它在模拟器中以及连接设备后都可以正常运行)。
我真的很困。这是崩溃报告:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x0000000100bc8b84 0x1009d8000 + 2034564
1 libswiftCore.dylib 0x0000000100bc8b84 0x1009d8000 + 2034564
2 libswiftCore.dylib 0x0000000100a31fa8 0x1009d8000 + 368552
3 UtilitaireBA 0x0000000100473508 0x1003c8000 + 701704
4 UtilitaireBA 0x0000000100473698 0x1003c8000 + 702104
5 UIKitCore 0x00000001c7e6a6d4 -[UIClassSwapper initWithCoder:] + 248
6 UIFoundation 0x00000001a5651cc4 UINibDecoderDecodeObjectForValue + 744
7 UIFoundation 0x00000001a55f081c -[UINibDecoder decodeObjectForKey:] + 320
8 UIKitCore 0x00000001c7e6ebbc -[UIRuntimeConnection initWithCoder:] + 188
9 UIKitCore 0x00000001c7e6ef98 -[UIRuntimeEventConnection initWithCoder:] + 64
10 UIFoundation 0x00000001a5651cc4 UINibDecoderDecodeObjectForValue + 744
11 UIFoundation 0x00000001a5651f08 UINibDecoderDecodeObjectForValue + 1324
12 UIFoundation 0x00000001a55f081c -[UINibDecoder decodeObjectForKey:] + 320
13 UIKitCore 0x00000001c7e6c4bc -[UINib instantiateWithOwner:options:] + 1124
14 UIKitCore 0x00000001c8357704 -[UIStoryboard instantiateViewControllerWithIdentifier:] + 196
15 UIKitCore 0x00000001c8358304 -[UIStoryboardSegueTemplate instantiateOrFindDestinationViewControllerWithSender:] + 92
16 UIKitCore 0x00000001c8358560 -[UIStoryboardSegueTemplate _perform:] + 56
17 UIKitCore 0x00000001c7c00b68 -[UIViewController performSegueWithIdentifier:sender:] + 108
18 UtilitaireBA 0x000000010044e6e0 0x1003c8000 + 550624
19 UtilitaireBA 0x000000010044e980 0x1003c8000 + 551296
20 UIKitCore 0x00000001c83cfc14 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1348
21 UIKitCore 0x00000001c83cfe78 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 268
22 UIKitCore 0x00000001c81d0cd0 _runAfterCACommitDeferredBlocks + 296
23 UIKitCore 0x00000001c81beccc _cleanUpAfterCAFlushAndRunDeferredBlocks + 384
24 UIKitCore 0x00000001c81edfa0 _afterCACommitHandler + 132
25 CoreFoundation 0x000000019af877a8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
26 CoreFoundation 0x000000019af8243c __CFRunLoopDoObservers + 412
27 CoreFoundation 0x000000019af829dc __CFRunLoopRun + 1264
28 CoreFoundation 0x000000019af821cc CFRunLoopRunSpecific + 436
29 GraphicsServices 0x000000019d1f9584 GSEventRunModal + 100
30 UIKitCore 0x00000001c81c5054 UIApplicationMain + 212
31 UtilitaireBA 0x00000001005013e4 0x1003c8000 + 1283044
32 libdyld.dylib 0x000000019aa42bb4 start + 4
答案 0 :(得分:0)
谢谢你们。我仍然不知道问题出在哪里。
我实际上在InterfaceBuilder中重做了整个序列,并遍历了viewController的整个代码。重新连接插座1比1,并在我连接东西时尝试了该应用程序。
现在,无论何时连接和未连接,它都可以在模拟器和设备上运行。
如果我弄清楚问题出在哪里,我会回来的。
谢谢。