-(instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = colorStr(@"ffffff");
//v.layer.masksToBounds=YES;这行去掉
self.layer.cornerRadius = 10;
self.layer.shadowColor = colorStr(@"#0B234D").CGColor;//阴影颜色
self.layer.shadowOffset = CGSizeMake(0, 0);//偏移距离
self.layer.shadowOpacity = 0.5;//不透明度
self.layer.shadowRadius = 5;//半径
}
return self;
}
网友评论