imageview或者UIView等控件正常切圆处理
UIView *whiteView = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.view.frame)/2-50, CGRectGetHeight(self.view.frame)/2-50, 100, 100)];
whiteView.backgroundColor = [UIColor whiteColor];
whiteView.layer.cornerRadius = 8;
whiteView.layer.masksToBounds = true;
绘制阴影 添加到layer层中所需位置
CALayer *subLayer=[CALayer layer];
CGRect fixframe = self.topicImageView.frame;
subLayer.frame = fixframe;
subLayer.cornerRadius = 8;
subLayer.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.8].CGColor;
subLayer.masksToBounds = NO;
subLayer.shadowColor = RGBA(0, 0, 0, 1).CGColor;
subLayer.shadowOffset = CGSizeMake(0,0);
subLayer.shadowOpacity = 1;
subLayer.shadowRadius = 6;
[self.layer insertSublayer:subLayer below:self.topicImageView.layer];
效果图