aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2023-04-26 19:48:49 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2023-04-26 19:48:49 +0200
commit90eb1b2137e0b80dc3af7e544c973971e45eab5a (patch)
treed9c1f76cd38fcf387aa6f4823764991b7e031181
parent5c40e23a9b05b53186995c73125fae5062ab73bf (diff)
Update README
-rw-r--r--README.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index d6cd0b8..512e2a0 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
SwiftUI tiling black and white patterns.
-This project contains `Patterns`, which are built out of `Tiles` with a given
+This project contains `PatternView`, which is built out of `Tiles` with a given
`TileDesign`.
It also includes a `TilePicker` that can be used to control the selected
@@ -31,7 +31,7 @@ top left to bottom right)
## Usage
-The `Pattern` view will tile the selected design in its frame. It has the
+The `PatternView` view will tile the selected design in its frame. It has the
following properties:
* `design: Binding<TileDesign>`: **required**, which design to use to tile the
@@ -41,11 +41,11 @@ following properties:
* `backgroundColor: Color`: **defaults to `Color.white`**, the background color.
```
-// Pattern using default settings
-Pattern(design: .constant(TileDesign.shadowGrid))
+// PatternView using default settings
+PatternView(design: .constant(TileDesign.shadowGrid))
-// Pattern using overrides
-Pattern(design: $tileDesign, pixelSize: 4.0, foregroundColor: .pink, backgroundColor: .cyan)
+// PatternView using overrides
+PatternView(design: $tileDesign, pixelSize: 4.0, foregroundColor: .pink, backgroundColor: .cyan)
```
### Screenshots of the Patterns
@@ -72,7 +72,7 @@ same effect as `Pattern` mentioned above
...
-Pattern(design: $pattern)
+PatternView(design: $pattern)
.frame(width: 32.0).border(.black)
.onTapGesture {
shouldShowPatternPicker = !shouldShowPatternPicker;
@@ -102,7 +102,7 @@ Pattern(design: $pattern)
If you'd like to do other things with the individual tiles, we also provide the
Tile view, which is just a single tile.
-The tiles support the same properties as `Pattern` with the exception that
+The tiles support the same properties as `PatternView` with the exception that
`design` is a `TileDesign` and not a `Binding<TileDesign>`
![Screenshots of the tiles showing the different overrides](./doc/images/tile_example.png)