0
uiimageviewの上隅を丸くしたいのですが、CASharpeLayerが描画された画像が消えると、この問題の原因をわかりません。willDisplayCellのコードの下に置きます。セルは、画像を再利用したときCAShapeLayerの結果、UIImageViewに画像が表示されない
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:cell.imgProduct.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(3.0,3.0)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = cell.imgProduct.bounds;
maskLayer.path = maskPath.CGPath;
cell.imgProduct.layer.mask = maskLayer;
cell.imgProduct.layer.masksToBounds=NO;
なぜドンこのコードをセルのサブクラスの 'layoutSubView'に入れませんか? – Proton
layoutSubViewでも同じ問題があります –
私はxcode 8.0 betaを使用していますが、それはそれに問題がありますか? –