스플래시 페이지 추가
This commit is contained in:
20
SodaLive/Sources/Shape/RoundedCorner.swift
Normal file
20
SodaLive/Sources/Shape/RoundedCorner.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// RoundedCorner.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2023/08/09.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
// 출처 - https://stackoverflow.com/a/58606176
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user