Cause
It's because I accidentally dragged a Tap Gesture Recognizer from the Object Library and dropped it on the UITableViewCell in IB.
Solution
Click on the Tap Gesture Recognizer icon and press Delete key.
section=0, numOfRows=10
Item: name=Shiny Mac, serialNumber=Optional("2A725A93"), valueInDollars=70, dateCreated=2017-10-05 09:37:41 +0000
row=0, section=0
2017-10-05 16:37:41.594 Homepwner[62092:2091530] *** Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CALayer: 0x600000036240> is a part of cycle in its layer tree'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102251b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001018a1141 objc_exception_throw + 48
2 CoreFoundation 0x00000001022ba625 +[NSException raise:format:] + 197
3 QuartzCore 0x0000000108867ea2 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 102
4 QuartzCore 0x0000000108867eed _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
5 QuartzCore 0x0000000108867eed _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
6 QuartzCore 0x0000000108867eed _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
7 QuartzCore 0x000000010886fb3a _ZN2CA5Layer15insert_sublayerEPNS_11TransactionEP7CALayerm + 394
8 QuartzCore 0x000000010886ff50 -[CALayer addSublayer:] + 180
9 UIKit 0x0000000102e1d7ad -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1322
10 UIKit 0x000000010311d9a0 -[UITableViewCell _addSubview:positioned:relativeTo:] + 357
11 UIKit 0x0000000102e0bcf8 -[UIView(Hierarchy) addSubview:] + 838
12 UIKit 0x000000010323b340 -[UITableViewCellLayoutManager layoutSubviewsOfCell:] + 2386
13 UIKit 0x000000010326db12 -[UITableViewCellLayoutManagerValue1 layoutSubviewsOfCell:] + 71
14 UIKit 0x00000001031271d7 -[UITableViewCell layoutSubviews] + 119
15 UIKit 0x0000000102e2155b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
16 QuartzCore 0x0000000108876904 -[CALayer layoutSublayers] + 146
17 QuartzCore 0x000000010886a526 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 370
18 UIKit 0x0000000102e0f334 -[UIView(Hierarchy) layoutBelowIfNeeded] + 1108
19 UIKit 0x0000000102e1608e +[UIView(Animation) performWithoutAnimation:] + 90
20 UIKit 0x0000000102ecac29 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1125
21 UIKit 0x0000000102ecacf8 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74
22 UIKit 0x0000000102e9f639 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2845
23 UIKit 0x0000000102ed3ccc -[UITableView _performWithCachedTraitCollection:] + 111
24 UIKit 0x0000000102ebae7a -[UITableView layoutSubviews] + 233
25 UIKit 0x0000000102e2155b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
26 QuartzCore 0x0000000108876904 -[CALayer layoutSublayers] + 146
27 QuartzCore 0x000000010886a526 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 370
28 QuartzCore 0x000000010886a3a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
29 QuartzCore 0x00000001087f9e92 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
30 QuartzCore 0x0000000108826130 _ZN2CA11Transaction6commitEv + 468
31 QuartzCore 0x0000000108826b37 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 115
32 CoreFoundation 0x00000001021f7717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
33 CoreFoundation 0x00000001021f7687 __CFRunLoopDoObservers + 391
34 CoreFoundation 0x00000001021dc038 CFRunLoopRunSpecific + 440
35 UIKit 0x0000000102d5808f -[UIApplication _run] + 468
36 UIKit 0x0000000102d5e134 UIApplicationMain + 159
37 Homepwner 0x00000001012bf8a7 main + 55
38 libdyld.dylib 0x00000001060b065d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
2017-09-24 16:40:23.780953+0700 Learn Swift[31177:1017369] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<_UILayoutSupportConstraint:0x600000090770 _UILayoutGuide:0x7ff359716960.height == 0 (active)>",
"<_UILayoutSupportConstraint:0x60000008eb00 V:|-(0)-[_UILayoutGuide:0x7ff359716960] (active, names: '|':UIView:0x7ff359715f40 )>",
"<_UILayoutSupportConstraint:0x6000000906d0 _UILayoutGuide:0x7ff359716b20.height == 0 (active)>",
"<_UILayoutSupportConstraint:0x600000090720 _UILayoutGuide:0x7ff359716b20.bottom == UIView:0x7ff359715f40.bottom (active)>",
"<NSLayoutConstraint:0x600000090950 V:[_UILayoutGuide:0x7ff359716960]-(113)-[NextButton] (active, names: NextButton:0x7ff359716370 )>",
"<NSLayoutConstraint:0x6000000909a0 V:[NextButton]-(465)-[_UILayoutGuide:0x7ff359716b20] (active, names: NextButton:0x7ff359716370 )>",
"<NSLayoutConstraint:0x60800008d430 'UIView-Encapsulated-Layout-Height' UIView:0x7ff359715f40.height == 568 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000000909a0 V:[NextButton]-(465)-[_UILayoutGuide:0x7ff359716b20] (active, names: NextButton:0x7ff359716370 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.