2017-07-21 10:34:14.447487+0530 demo[2783:104307] [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.
(
"<NSLayoutConstraint:0x60000009a6d0 UICollectionView:0x7fbc1b825800.width == 343 (active)>",
"<NSLayoutConstraint:0x61000009b670 H:|-(16)-[UICollectionView:0x7fbc1b825800] (active, names: '|':UIView:0x7fbc1a50d210)>",
"<NSLayoutConstraint:0x61000009a680 H:[UICollectionView:0x7fbc1b825800]-(16)-| (active, names: '|':UIView:0x7fbc1a50d210)>",
"<NSLayoutConstraint:0x60800009a6d0 'UIView-Encapsulated-Layout-Width' UIView:0x7fbc1a50d210.width == 320 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000009a6d0 UICollectionView:0x7fbc1b825800.width == 343 (active)>
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.
2017-07-21 10:34:14.453212+0530 demo[2783:104307] [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:0x61000009bd00 _UILayoutGuide:0x7fbc1a40ae80.height == 20 (active)>",
"<_UILayoutSupportConstraint:0x6100000986f0 V:|-(0)-[_UILayoutGuide:0x7fbc1a40ae80] (active, names: '|':UIView:0x7fbc1a50d210)>",
"<_UILayoutSupportConstraint:0x61000009bda0 _UILayoutGuide:0x7fbc1a40b580.height == 0 (active)>",
"<_UILayoutSupportConstraint:0x61000009bd50 _UILayoutGuide:0x7fbc1a40b580.bottom == UIView:0x7fbc1a50d210.bottom (active)>",
"<NSLayoutConstraint:0x608000099a00 UIButton:0x7fbc1a40a5e0'Submit'.height == 30 (active)>",
"<NSLayoutConstraint:0x60000009a950 UICollectionView:0x7fbc1b825800.height == 589 (active)>",
"<NSLayoutConstraint:0x61000009b490 V:[UIButton:0x7fbc1a40a5e0'Submit']-(8)-[UICollectionView:0x7fbc1b825800] (active)>",
"<NSLayoutConstraint:0x61000009b710 V:[_UILayoutGuide:0x7fbc1a40ae80]-(0)-[UIButton:0x7fbc1a40a5e0'Submit'] (active)>",
"<NSLayoutConstraint:0x61000009b760 V:[UICollectionView:0x7fbc1b825800]-(20)-[_UILayoutGuide:0x7fbc1a40b580] (active)>",
"<NSLayoutConstraint:0x60800009af40 'UIView-Encapsulated-Layout-Height' UIView:0x7fbc1a50d210.height == 568 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000009a950 UICollectionView:0x7fbc1b825800.height == 589 (active)>
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.
2017-07-21 10:34:14.457 demo[2783:104307] *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.7.47/UICollectionView.m:5115
2017-07-21 10:34:14.499 demo[2783:104307] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a16eb0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000107414141 objc_exception_throw + 48
2 CoreFoundation 0x000000010a172cf2 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000106fae536 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 UIKit 0x000000010822cea3 -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:] + 1991
5 UIKit 0x000000010822d2fb -[UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] + 169
6 demo 0x0000000106e2e7d6 _TFC4demo20SecondViewController14collectionViewfTCSo16UICollectionView13cellForItemAtV10Foundation9IndexPath_CSo20UICollectionViewCell + 150
7 demo 0x0000000106e2eaf7 _TToFC4demo20SecondViewController14collectionViewfTCSo16UICollectionView13cellForItemAtV10Foundation9IndexPath_CSo20UICollectionViewCell + 87
8 UIKit 0x0000000108218925 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 446
9 UIKit 0x0000000108218761 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:] + 35
10 UIKit 0x000000010821d9bd -[UICollectionView _updateVisibleCellsNow:] + 4764
11 UIKit 0x000000010822338e -[UICollectionView layoutSubviews] + 313
12 UIKit 0x00000001079a955b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
13 QuartzCore 0x000000010cf38904 -[CALayer layoutSublayers] + 146
14 QuartzCore 0x000000010cf2c526 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 370
15 QuartzCore 0x000000010cf2c3a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
16 QuartzCore 0x000000010cebbe92 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
17 QuartzCore 0x000000010cee8130 _ZN2CA11Transaction6commitEv + 468
18 QuartzCore 0x000000010cee8b37 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 115
19 CoreFoundation 0x000000010a114717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
20 CoreFoundation 0x000000010a114687 __CFRunLoopDoObservers + 391
21 CoreFoundation 0x000000010a0f9038 CFRunLoopRunSpecific + 440
22 UIKit 0x00000001078e008f -[UIApplication _run] + 468
23 UIKit 0x00000001078e6134 UIApplicationMain + 159
24 demo 0x0000000106e319a7 main + 55
25 libdyld.dylib 0x000000010b10e65d start + 1
)
ich eine App in swift bin Programmierung und wenn ich ausführen, um den Test-App auf dem iPhone Simulator alles funktioniert, aber es stürzt ab und zeigt diesen Fehlerbericht im Konsolenprotokoll an. Eine andere Sache ist, dass ich gerade zwei View-Controller in meiner App erstellt habe und ich die Collection-Ansicht darin entworfen habe. In der ersten Ansicht Controller-Steuerelement, aber in der zweiten Ansicht Controller meine Sammlung Ansicht funktioniert nicht.libC++ abi.dylib: mit abgefangene Ausnahme vom Typ NSException (Fehler in der Sammlung Ansicht) Beenden
es Ihrer Sammlung Ansicht Breite und Höhe UICollectionView in Konflikt entweder entfernen oder niedrige Priorität –
Einschränkungen nicht geben kann App zum Absturz bringen, werden sie einfach ignoriert. –