Initial commit

This commit is contained in:
15lu.akari
2025-08-24 14:44:50 +03:00
parent dca1ae410b
commit 5a583d9415
50 changed files with 2019 additions and 17 deletions

View File

@ -0,0 +1,17 @@
import SwiftUI
extension View {
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
clipShape(RoundedCorner(radius: radius, corners: corners))
}
}
private struct RoundedCorner: Shape {
var radius: CGFloat = .infinity
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)
}
}