当前位置: 首页 > 工具软件 > Rounded View > 使用案例 >

View的圆角

后化
2023-12-01

UIBezierPath* rounded = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, ScreenWidth, ScreenHeight*3/4) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(10.0f, 10.0f)];

        CAShapeLayer* shape = [[CAShapeLayer alloc] init];

        [shape setPath:rounded.CGPath];

        self.layer.mask = shape;

 类似资料: