怎么给view加阴影的同时增加圆角:
顺序很重要,先加阴影后加圆角并且不切角;如:
UIView *imgView = [[UIView alloc]init];
imgView.backgroundColor = [UIColor whiteColor];
imgView.layer.shadowColor = [UIColor blackColor].CGColor;
imgView.layer.shadowRadius = 5;
imgView.layer.shadowOffset = CGSizeMake(0, 5);
imgView.layer.shadowOpacity = 0.3;
imgView.layer.cornerRadius = 3;
imgView.clipsToBounds = NO;