Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vinhnx authored Dec 18, 2020
1 parent 102e261 commit 50b02e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This component is built using Swift Package Manager, it is pretty straight forwa
1. In Xcode (11+), open your project and navigate to `File > Swift Packages > Add Package Dependency...`
2. Paste the repository URL (`https://github.com/vinhnx/Laden`) and click Next.
3. For Rules, select Branch (with branch set to `main`).
4. Click Finish to resolve package into your Xcode project.
4. Click `Finish` to resolve package into your Xcode target.

### Usage

Expand All @@ -30,7 +30,7 @@ struct ContentView: View {

---

To show loading view on top on current view by embedding inside a `ZStack`:
To show loading view on top on current view, you can embed Laden inside a `ZStack`, and put it below your current view:

```swift
ZStack {
Expand All @@ -41,6 +41,9 @@ ZStack {

![ZStack](./Resources/loading_zstack.gif "ZStack")

> ### [ZStack](https://developer.apple.com/documentation/swiftui/zstack)
> A view that overlays its children, aligning them in both axes.
---

To indicate loading state, have a private loading bool `@State` and bind it to Laden's `isAnimating` initialzier, default value is `true` (or animated by default):
Expand Down

0 comments on commit 50b02e7

Please sign in to comment.