UIRectCorner corner = UIRectCornerTopRight | UIRectCornerTopLeft; // 圓角位置,全部位置
UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:self.btnImg.bounds byRoundingCorners:corner cornerRadii:CGSizeMake(5, 5)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = self.btnImg.bounds;
maskLayer.path = path.CGPath;
view.layer.mask = maskLayer;
ios view部分圓角
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.