我正在为我的移动应用开发人员构建“待办事项列表应用”。课堂上,我遇到了一个使我无法继续下去的问题。当我建造时,几秒钟过去了,出现了Sigabrt。没有具体的代码,因为我不知道根在哪里。虽然这可能是有限制的。链接到下载项目:https://github.com/mcook342/Sigabrtn-after-startup/blob/master/toDoList%202.zip
我试图删除所有约束,没有任何改变。
2019-05-20 11:17:12.753234-0500 toDoList [2529:4957817] [LayoutConstraints]无法同时满足约束。 以下列表中至少有一个约束是您不想要的约束。 尝试这个: (1)查看每个约束,并尝试找出不期望的约束; (2)查找添加了一个或多个不必要约束的代码并进行修复。 ( “ = UILayoutGuide:0x6000001b12c0'TitleView(0x7ff603c10950)'。top(活动)>”, ” )
将尝试通过打破约束来恢复 = UILayoutGuide:0x6000001b12c0'TitleView(0x7ff603c10950)'。top(活动)>
在UIViewAlertForUnsatisfiableConstraints上创建一个符号断点,以在调试器中捕获该断点。 列出的UIView的UIConstraintBasedLayoutDebugging类别中的方法也可能会有所帮助。 2019-05-20 11:17:12.778879-0500 toDoList [2529:4957817] [错误]错误:无法加载名为Todos的模型 CoreData:错误:无法加载名为Todos的模型 2019-05-20 11:17:12.784865-0500 toDoList [2529:4957817] *由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'NSFetchedResultsController的实例需要非空的fetchRequest和managedObjectContext' * 第一个调用堆栈: ( 0 CoreFoundation 0x00000001097091e6 exceptionPreprocess + 294 1 libobjc.A.dylib 0x00000001054f1031 objc_exception_throw + 48 2 CoreData 0x0000000105fc4699-[NSFetchedResultsController initWithFetchRequest:managedObjectContext:sectionNameKeyPath:cacheName:] + 2057 3 toDoList 0x0000000104bd10db _T0So26NSFetchedResultsControllerCAByxGSo14NSFetchRequestCyxG05fetchE0_So22NSManagedObjectContextC07managedhI0SSSg18sectionNameKeyPathAK05cacheL0tcfcTO + 395 4 toDoList 0x0000000104bce9ee _T0So26NSFetchedResultsControllerCAByxGSo14NSFetchRequestCyxG05fetchE0_So22NSManagedObjectContextC07managedhI0SSSg18sectionNameKeyPathAK05cacheL0tcfC + 190 5 toDoList 0x0000000104bce33d _T08toDoList23TodoTableViewControllerC11viewDidLoadyyF + 781 6 toDoList 0x0000000104bceaa4 _T08toDoList23TodoTableViewControllerC11viewDidLoadyyFTo + 36 7 UIKit 0x000000010652d131-[UIViewController loadViewIfRequired] + 1215 8 UIKit 0x000000010657420c-[UINavigationController _updateScrollViewFromViewController:toViewController:] + 68 9 UIKit 0x00000001065744ea-[UINavigationController _startTransition:fromViewController:toViewController:] + 136 10 UIKit 0x000000010657561e-[UINavigationController _startDeferredTransitionIfNeeded:] + 870 11 UIKit 0x000000010657686c-[UINavigationController __viewWillLayoutSubviews] + 150 12 UIKit 0x00000001067ced0b-[UILayoutContainerView layoutSubviews] + 231 13 UIKit 0x00000001064587a8-[UIView(CALayerDelegate)layoutSublayersOfLayer:] + 1515 14 QuartzCore 0x000000010ce91456-[CALayer layoutSublayers] + 177 15 QuartzCore 0x000000010ce95667 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395 16 QuartzCore 0x000000010ce1c0fb _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 343 17 QuartzCore 0x000000010ce4979c _ZN2CA11Transaction6commitEv + 568 18 UIKit 0x00000001063a3269 __34- [UIApplication _firstCommitBlock] _block_invoke_2 + 141 19 CoreFoundation 0x00000001096abb0c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12 20 CoreFoundation 0x00000001096902db __CFRunLoopDoBlocks + 331 21 CoreFoundation 0x000000010968fa84 __CFRunLoopRun + 1284 22 CoreFoundation 0x000000010968f30b CFRunLoopRunSpecific + 635 23 GraphicsServices 0x000000010c01aa73 GSEventRunModal + 62 24 UIKit 0x0000000106389057 UIApplicationMain + 159 25 toDoList 0x0000000104bd60f7主+ 55 26 libdyld.dylib 0x000000010a8e3955开始+ 1 ) libc ++ abi.dylib:以类型为NSException的未捕获异常终止 (lldb)