Add QuartzCore.framework to your project and this line to your .m file.
#import <QuartzCore/QuartzCore.h>
示例代码如下:
原文地址:http://stackoverflow.com/questions/7813379/what-does-receiver-type-calayer-for-instance-message-is-a-forward-declaration
#import <QuartzCore/QuartzCore.h>
示例代码如下:
- UIButton *moreButton = [UIButton buttonWithType:UIButtonTypeCustom];
- moreButton.frame = CGRectMake(1.0f, 1.0f, cell.contentView.frame.size.width-2, cell.contentView.frame.size.height-2);
- [moreButton.layer setMasksToBounds:YES];
- [moreButton.layer setCornerRadius:10.0]; //设置矩形四个圆角半径
- [moreButton.layer setBorderWidth:1.0]; //边框宽度
- moreButton.backgroundColor = [UIColor clearColor];
原文地址:http://stackoverflow.com/questions/7813379/what-does-receiver-type-calayer-for-instance-message-is-a-forward-declaration