uiimageviewの上部の2つの角を丸めようとしていますが、次のコードでは、通常の画像だけが丸みを帯びた角を示していません。私は何かが足りないのですか?どうも
UIImageView * imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 328)];
imgView.backgroundColor = [UIColor clearColor];
imgView.contentMode = UIViewContentModeScaleAspectFill;
imgView.image = image;
CAShapeLayer * shapeLayer = [CAShapeLayer layer];
shapeLayer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, 320, 328) byRoundingCorners:2 cornerRadii:CGSizeMake(20.0, 20.0)].CGPath;
shapeLayer.frame = CGRectMake(0, 0, 320, 328);
self.profilePictureView.layer.mask = shapeLayer.mask;
self.profilePictureView.layer.masksToBounds = YES;
[cell.contentView addSubview:self.profilePictureView];
cell.contentView.backgroundColor = [UIColor clearColor];