Complete Day 43

This commit is contained in:
CypherPoet 2019-11-05 15:01:41 -06:00
parent 5381ec87d9
commit 7e8e4e8ccc
2 changed files with 55 additions and 1 deletions

View File

@ -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/)
</details>
- **Day 42:** [_Project 8: Moonshot_ (Part Four)](./day-042/)
- **Day 43:** [_Project 9: Drawing_ (Part One)](./day-043/)

53
day-043/README.md Normal file
View File

@ -0,0 +1,53 @@
# Day 43: _Project 9: Drawing_ (Part One)
_Follow along at https://www.hackingwithswift.com/100/swiftui/43_.
<br/>
# 📒 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 were 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
...
}
```