我在单元格内部有一个地图视图,我希望它有圆角半径和阴影。当我将遮罩分别设置为ON / OFF时,我要么只得到圆角,要么只有阴影和没有圆角。我抬头看了这个例子: Can't add a corner radius and a shadow
但没有成功。 我错过了什么?提前谢谢你!
[[cell.map1 layer] setShadowColor:[UIColor blackColor].CGColor];
[[cell.map1 layer] setShadowOpacity:0.8f];
[[cell.map1 layer] setShadowRadius:20.0f];
[[cell.map1 layer] setShadowOffset:CGSizeMake(0, 3)];
// [[cell.map1 layer] setMasksToBounds:NO];
[[cell.map1 layer] setShouldRasterize:YES];
[[cell.map1 layer] setCornerRadius:20];