1

我在按钮(IBOutlet)上应用以下图层属性

CGColorRef colorRef = [[UIColor colorWithRed:180.0f/255.0f green:243.0f/255.0f blue:254.0f/255.0f alpha:1] CGColor];
button.layer.borderWidth = 4;
button.layer.borderColor = colorRef;
button.layer.cornerRadius = 4.0;

我已经添加了 QuartzCore 库并在我的 .m 文件中导入了 QuartzCore/QuartzCore.h。

此代码在 6.1 模拟器上运行良好,但在 iOS 6.0.1 的 ipad 3 和 iOS 5.1.1 的 ipad 上都崩溃,没有信息错误。堆栈跟踪没有显示任何有用的东西。

仅供参考,我还在 CALayer 上应用了一些其他属性,它们在所有设备上都运行良好。

任何帮助将非常感激。谢谢。

4

0 回答 0