我从FlatUIKit手动下载类并将其添加到我的 Xcode 项目中(因为通过 CocoaPods 安装它不会下载某些类,例如UITableViewCell+FlatUI
)...每当我尝试从任何 FlatUIKit 类调用其中一种方法时,应用程序崩溃,这会显示在 Xcode 上:
日志:
CoreFoundation`__CFTypeCollectionRetain:
0x33d5e260: push {r4, r7, lr}
0x33d5e262: mov r4, r1
0x33d5e264: add r7, sp, #4
0x33d5e266: cbnz r4, 0x33d5e274 ; __CFTypeCollectionRetain + 20
0x33d5e268: trap
0x33d5e26a: blx 0x33dc7a4c ; symbol stub for: -[NSOrderedSet intersectsSet:]
0x33d5e26e: movs r1, #9
0x33d5e270: blx 0x33dc7b1c ; symbol stub for: __61-[NSOrderedSet sortedArrayFromRange:options:usingComparator:]_block_invoke_0
0x33d5e274: mov r0, r4
0x33d5e276: pop.w {r4, r7, lr}
0x33d5e27a: b.w 0x33cc7d1c ; CFRetain
0x33d5e27e: nop
我猜这与ARC有关?我该如何解决这个问题?这是给出 EXC_BREAKPOINT 的示例代码
FUIButton *button = [FUIButton buttonWithType:UIButtonTypeCustom];
[button addTarget:self action:@selector(loginButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
[button setTitle:@"Iniciar Sesión" forState:UIControlStateNormal];
button.frame = CGRectMake(80, 210, 140, 40);
button.buttonColor = [UIColor turquoiseColor];
button.shadowColor = [UIColor greenSeaColor];
button.shadowHeight = 3.0f;
button.cornerRadius = 6.0f;
button.titleLabel.font = [UIFont boldFlatFontOfSize:16];
[button setTitleColor:[UIColor cloudsColor] forState:UIControlStateNormal];
[button setTitleColor:[UIColor cloudsColor] forState:UIControlStateHighlighted];
[[self ScrollView]addSubview:button];
NSLog(@"Oks");