SodaLive
Preview Content
Resources
Sources
Agora
App
Common
Content
Debug
Dialog
Explorer
Extensions
Follow
Font
FortuneWheel
IAP
ImagePicker
Keyboard
Live
Main
Message
MyPage
NavigationBar
Onboarding
Report
Settings
Shape
RoundedCorner.swift
Splash
User
Utils
ContentView.swift
SodaLive.entitlements
SodaLive.xcworkspace
generated
.gitignore
Podfile
Podfile.lock
SodaLive-dev.entitlements
model-SodaLive-dev.json
model-SodaLive.json
21 lines
477 B
Swift
21 lines
477 B
Swift
//
|
|
// 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)
|
|
}
|
|
}
|