iOS开发点滴-添加阴影效果

 UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:_backView.bounds];

    _backView.layer.masksToBounds = NO;

    _backView.layer.shadowColor = [UIColor blackColor].CGColor;

    _backView.layer.shadowOffset = CGSizeMake(3.0f, 3.0f);

    _backView.layer.shadowOpacity = 0.5f;

    _backView.layer.shadowRadius=10;

    _backView.layer.shadowPath = shadowPath.CGPath;

posted @ 2015-07-20 10:45  云端止水  阅读(205)  评论(0编辑  收藏  举报