Posts

Post not yet marked as solved
0 Replies
442 Views
I have the following code snippet that draws a circular sector shape: swift struct CircularSector: Shape { let centralAngle: Angle func path(in rect: CGRect) - Path { let radius = min(rect.width, rect.height) / 2 let center = CGPoint(x: rect.midX, y: rect.midY) var path = Path() path.addArc(center: center, radius: radius, startAngle: .degrees(0), endAngle: centralAngle, clockwise: true) path.addLine(to: center) path.closeSubpath() return path } } When I preview it, swift struct CircularSector_Previews: PreviewProvider { static var previews: some View { CircularSector(centralAngle: .degrees(45)).fill(Color.black) } } } instead of a 45° sector clockwise, it draws a 315° sector counterclockwise.
Posted Last updated
.
Post not yet marked as solved
8 Replies
1.2k Views
Could Apple release the Mosaic project used in WWDC20 session 10149 - https://developer.apple.com/videos/play/wwdc2020/10149/? The project uses CloudKit and/or Core Data with the new SwiftUI, and can help answer questions the community has regarding how these frameworks work together: https://developer.apple.com/forums/thread/650309 https://developer.apple.com/forums/thread/650173 https://developer.apple.com/forums/thread/649860
Posted Last updated
.
Post not yet marked as solved
1 Replies
475 Views
What was the keyboard shortcut used for selecting multiple parameter values in the same function? I can only tell that the option key was used because of the plus-shaped cursor. But the cursor itself didn't move after selecting the first parameter value, so there must be some other keys used in combination.
Posted Last updated
.