-1
私は青いUIViewを持っていて、私はトップコーナーが必要です。
は、これは私のコードです:UIViewコーナーの問題
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.backgroundContentView.bounds byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerTopRight) cornerRadii:CGSizeMake(20.0, 20.0)];
CAShapeLayer *shapeLayer = [[CAShapeLayer alloc] init];
shapeLayer.frame = self.backgroundContentView.bounds;
shapeLayer.path = path.CGPath;
self.backgroundContentView.layer.mask = shapeLayer;
しかし、私は唯一のleftTopコーナーを持っています。どうして?それは助けにはならなかった
へのallocメモリにこのコード。結果は同じです – user3788086
またhttp://stackoverflow.com/q/35685726/77567 –