๐has non-Sendable type
โฉ
import SwiftUI
// โญ๏ธ Shape is Sendable
struct MyAnyShape: Shape {
// โญ๏ธ properties must be Sendable too.
private let shape: (CGRect) -> Path // ๐ error
init<S: Shape>(_ wrapped: S) {
self.shape = { rect in
wrapped.path(in: rect)
}
}
func path(in rect: CGRect) -> Path {
shape(rect)
}
}้ฏ่ชคๅๅ
่งฃๆฑบๆนๆก
Last updated