1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| //
| // Untitled.swift
| // LiveProject
| //
| // Created by 倪路朋 on 7/5/25.
| //
|
| import SwiftUI
|
| struct RoundedCorner: Shape {
| var radius: CGFloat = 10
| var corners: UIRectCorner = .allCorners
|
| func path(in rect: CGRect) -> Path {
| let path = UIBezierPath(
| roundedRect: rect,
| byRoundingCorners: corners,
| cornerRadii: CGSize(width: radius, height: radius)
| )
| return Path(path.cgPath)
| }
| }
|
|