Post

Replies

Boosts

Views

Activity

Why does path draw towards the opposite direction?
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.
0
0
545
Feb ’21
Multi-selection shortcut at time mark 31:06
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.
1
0
574
Aug ’20
Could Apple Release Mosaic as Demo Code?
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
8
0
1.5k
Jun ’20