给UIView加上阴影效果
UIView *topView = [[UIView alloc]initWithFrame:CGRectMake(HWScreenW*0.5, HWNaviBarH, HWScreenW*0.5, 44*self.dataSource.count)];
topView.backgroundColor = [UIColor darkGrayColor];
topView.layer.masksToBounds = false;
topView.layer.shadowOffset = CGSizeMake(0, 3);
topView.layer.shadowOpacity = 0.3;
topView.layer.shadowRadius = 3;
topView.layer.shadowColor = HWRGBColor(102, 145, 251).CGColor;
topView.layer.cornerRadius = 5;
topView.layer.borderWidth = 1;
topView.layer.borderColor = [UIColor whiteColor].CGColor;
[self addSubview:topView];
网友评论