我正在使用此代码制作一个圆角的视图:
-(IBAction)goToSpecificPage:(UIButton *)sender {
skipButtonBackgroundView = [[UIView alloc] initWithFrame:CGRectMake(self.view.bounds.size.width-400, 0.0f, 400.0f, 55.0f)];
UIColor *backGroundColor = [UIColor colorWithRed:0.85098039215 green:0.85098039215 blue:0.85098039215 alpha:1];
skipButtonBackgroundView.backgroundColor = backGroundColor;
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:skipButtonBackgroundView.bounds byRoundingCorners:UIRectCornerBottomLeft cornerRadii:CGSizeMake(10.0, 10.0)];
// Create the shape layer and set its path
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = skipButtonBackgroundView.bounds;
maskLayer.path = maskPath.CGPath;
skipButtonBackgroundView.layer.mask = maskLayer;
[self.view addSubview:skipButtonBackgroundView]; // Drop shadow
}
但我无法删除视图的阴影。
谢谢...