2013-06-28 98 views
1

我下载并手动将FlatUIKit中的类手动添加到我的Xcode项目中(因为通过CocoaPods安装它不会下载某些类,例如UITableViewCell+FlatUI)......每当我尝试调用其中一个从任何FlatUIKit类,应用程序崩溃的方法,这被显示在Xcode中:当调用iOS上的FlatUIKit方法时,应用程序崩溃

enter image description here

登录:

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"); 
+1

该图像不可用。也许你可以复制并粘贴崩溃日志。 –

+0

@verbumdei更新了问题。 –

+0

你在项目中使用ARC吗? –

回答

1

您是否在项目中包含CoreText.framework? FlatUIKit需要这个框架。

另外我看到你使用的是平面字体。这些都需要包含在您的项目中

3

经过一些测试,FlatUIKit不再像我在发布这个问题时那样对我造成影响。我认为这个问题在某种程度上与通过CocoaPods安装的库有关。

为避免此问题,我现在直接从GitHub的项目页面下载de .zip,并手动将其添加到我的项目中。 确保将“Resources”文件夹拖放到项目中,因为它包含FlatUIKit使用的字体。

每当我需要FlatUIKit,我现在手动安装它,它不会再为我崩溃。