【发布时间】:2017-04-05 04:17:25
【问题描述】:
@implementation AVSuperView
- (AVSuperView*)initWithFrame:(CGRect)frame{
if (self = [super initWithFrame:frame]) {
// self.backgroundColor = [UIColor redColor];
self.layer.backgroundColor = [[UIColor redColor] CGColor];
AVLayout* avLayout = [[AVLayout alloc] init];
在自定义 UIView 中,例如上面,似乎self.backgroundColor 和self.layer.backgroundColor 是一样的。 self.backgroundColor 是 self.layer.backgroundColor 的包装器吗?
【问题讨论】:
标签: ios cocoa-touch core-animation