0
点赞
收藏
分享

微信扫一扫

iOS view的上左 上右 下左 下右 的单独圆角问题

    UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
    view.backgroundColor=[UIColor greenColor];
    [self.view addSubview:view];
    CAShapeLayer *maskLayer = [CAShapeLayer layer];
    maskLayer.path = [UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners: UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii: (CGSize){5.0f, 5.0f}].CGPath
    view.layer.masksToBounds = YES;
    view.layer.mask = maskLayer;
举报

相关推荐

0 条评论