我从 Crashlytics 收到了这份崩溃报告。有谁知道为什么会发生这种情况?请帮我。谢谢。
致命异常:NSInternalInconsistencyException UICollectionView 内部不一致:缺少单元格 <Cell_NAME: 0x1193123c0; 的最终属性;基类 = UICollectionViewCell; 帧=(0 716;414 68.5);层 = <CALayer: 0x283944dc0>>; 初始属性: <UICollectionViewLayoutAttributes: 0x12640a2d0> 索引路径:(<NSIndexPath: 0xac46dcd1e0749431> {length = 2, path = 3 - 0}); 帧=(0 716;414 68.5);; 布局查询: <UICollectionViewLayoutAttributes: 0x107239cb0> 索引路径:(<NSIndexPath: 0xac46dcd1e0749431> {length = 2, path = 3 - 0}); 帧=(0 590;414 64);; 集合视图:<UICollectionView:0x109891000;帧=(0 0;414 896);剪辑边界=是;手势识别器 = <NSArray: 0x28369b3c0>; 层 = <CALayer: 0x2838dff60>; 内容偏移: {0, 244}; 内容大小: {414, 1253}; 调整后的内容插入: {48, 0, 34, 0}; 布局:<UICollectionViewCompositionalLayout:0x107398c10>;数据源:<VC_NAME:0x10e018600>>
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x990fc __exceptionPreprocess
1 libobjc.A.dylib …Run Code Online (Sandbox Code Playgroud) 请帮帮我。我想知道为什么会这样。
这段代码没有给出正确答案:
#include < stdio.h>
int main()
{
char c,ch;
int i;
printf("Welcome buddy!\n\nPlease input first character of your name: ");
scanf("%c",&c);
printf("\nPlease input first character of your lovers name: ");
scanf("%c",&ch);
printf("\nHow many children do you want? ");
scanf("%d",&i);
printf("\n\n%c loves %c and %c want %d children",c,ch,c,i);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
但这段代码给出了正确的答案。
#include < stdio.h>
int main()
{
char c,ch;
int i;
printf("Welcome buddy!\n\nPlease input first character of your name: ");
scanf(" %c",&c);
printf("\nPlease input first character of your lovers …Run Code Online (Sandbox Code Playgroud)