diff --git a/README.md b/README.md index 12b7616..1787a54 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,11 @@ Cheers! ✌️ - **Day 39:** [_Project 8: Moonshot_ (Part One)](./day-039/) - **Day 40:** [_Project 8: Moonshot_ (Part Two)](./day-040/) - **Day 41:** [_Project 8: Moonshot_ (Part Three)](./day-041/) +- **Day 42:** [_Project 8: Moonshot_ (Part Four)](./day-042/) -- **Day 42:** [_Project 8: Moonshot_ (Part Four)](./day-042/) +- **Day 43:** [_Project 9: Drawing_ (Part One)](./day-043/) diff --git a/day-043/README.md b/day-043/README.md new file mode 100644 index 0000000..f378018 --- /dev/null +++ b/day-043/README.md @@ -0,0 +1,53 @@ +# Day 43: _Project 9: Drawing_ (Part One) + +_Follow along at https://www.hackingwithswift.com/100/swiftui/43_. + +
+ + +# 📒 Field Notes + +This day covers Part One of _`Project 9: Drawing`_ in the [100 Days of SwiftUI Challenge](https://www.hackingwithswift.com/100/swiftui/43). + +It focuses on several specific topics: + +- Drawing: Introduction +- Creating custom paths with SwiftUI +- Paths vs shapes in SwiftUI +- Adding strokeBorder() support with InsettableShape + + + +## Drawing: Introduction + +From the description: + +> In this technique project we’re going to take a close look at drawing in SwiftUI, including creating custom paths and shapes, animating your changes, solving performance problems, and more> + + + +## Creating custom paths with SwiftUI + + +For custom paths, the `StrokeStyle` constructor is one of your best friends. This gives us fine-grained +control over many of the imporant properties that define path style: + +```swift +public struct StrokeStyle : Equatable { + + public var lineWidth: CGFloat + + public var lineCap: CGLineCap + + public var lineJoin: CGLineJoin + + public var miterLimit: CGFloat + + public var dash: [CGFloat] + + public var dashPhase: CGFloat + + + ... +} +```