๐ฆAnyShape
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
SwiftUI โฉ shapes โฉ Shape โฉ AnyShape
A type-erased shape value. You can use this type to dynamically switch between shape types.
struct MyClippedView: View {
var isCircular: Bool
var body: some View {
ClippedView()
// โ
OK (ๅฐ Circle ่ Capsule ๅ็บ AnyShape)
.clipShape(isCircular ? AnyShape