From 50b02e73c657ee8a9868b9ab7d5ac84c5c7e32f2 Mon Sep 17 00:00:00 2001 From: Vinh Nguyen Date: Fri, 18 Dec 2020 10:38:14 +0700 Subject: [PATCH] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e8a68a3..476ea5a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 { @@ -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):