Files
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
sodalive-ios/SodaLive/Sources/Shape/RoundedCorner.swift
2023-08-09 16:53:14 +09:00

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)
}
}