generated from StanfordBDHG/SwiftPackageTemplate
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc88f66
commit 9be97d8
Showing
19 changed files
with
176 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ builder: | |
- platform: ios | ||
documentation_targets: | ||
- SpeziQuestionnaire | ||
- SpeziTimedWalkTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+238 KB
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/GetReady.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/GetReady.png.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This source file is part of the Stanford Spezi open-source project | ||
|
||
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
Binary file added
BIN
+259 KB
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/GetReady~dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/GetReady~dark.png.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This source file is part of the Stanford Spezi open-source project | ||
|
||
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
Binary file added
BIN
+265 KB
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/Result.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/Result.png.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This source file is part of the Stanford Spezi open-source project | ||
|
||
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
Binary file added
BIN
+291 KB
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/Result~dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/Result~dark.png.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This source file is part of the Stanford Spezi open-source project | ||
|
||
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
Binary file added
BIN
+213 KB
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/TimedWalkTest.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/TimedWalkTest.png.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This source file is part of the Stanford Spezi open-source project | ||
|
||
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
Binary file added
BIN
+225 KB
...ces/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/TimedWalkTest~dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/Resources/TimedWalkTest~dark.png.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This source file is part of the Stanford Spezi open-source project | ||
|
||
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
93 changes: 93 additions & 0 deletions
93
Sources/SpeziTimedWalkTest/SpeziTimedWalkTest.docc/SpeziTimedWalkTest.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# ``SpeziTimedWalkTest`` | ||
|
||
<!-- | ||
# | ||
# This source file is part of the Stanford Spezi open source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
--> | ||
|
||
Enables apps to conduct an timed walk test. | ||
|
||
## Overview | ||
|
||
The `SpeziTimedWalkTest` target in the Spezi Questinnaire package enables the conduction of timed walk tests in an app, | ||
|
||
@Row { | ||
@Column { | ||
@Image(source: "GetReady", alt: "Get ready screen of the TimedWalkTestView defined by a TimedWalkTest."){ | ||
Get ready screen of the ``TimedWalkTestView`` defined by a ``TimedWalkTest``. | ||
} | ||
} | ||
@Column { | ||
@Image(source: "TimedWalkTest", alt: "The TimedWalkTestView used to conduct a TimedWalkTest."){ | ||
The ``TimedWalkTestView`` used to conduct a ``TimedWalkTest``. | ||
} | ||
} | ||
@Column { | ||
@Image(source: "Result", alt: "Display of the result of the TimedWalkTestView encoded in a TimedWalkTestResult."){ | ||
Display of the result of the ``TimedWalkTestView`` encoded in a ``TimedWalkTestResult`` | ||
} | ||
} | ||
} | ||
|
||
## Setup | ||
|
||
You need to add the Spezi Questionnaire Swift package to | ||
[your app in Xcode](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app) or | ||
[Swift package](https://developer.apple.com/documentation/xcode/creating-a-standalone-swift-package-with-xcode#Add-a-dependency-on-another-Swift-package). | ||
|
||
> Important: If your application is not yet configured to use Spezi, follow the [Spezi setup article](https://swiftpackageindex.com/stanfordspezi/spezi/documentation/spezi/initial-setup) and set up the core Spezi infrastructure. | ||
## Example | ||
|
||
In the following example, we create a SwiftUI view with a button that displays a the timed walk test view defined by the ``TimedWalkTest`` using the ``TimedWalkTestView``. | ||
|
||
```swift | ||
import SpeziTimedWalkTest | ||
import SwiftUI | ||
|
||
|
||
struct ExampleView: View { | ||
@State var displayWalkTest = false | ||
|
||
|
||
private var timedWalkTest: TimedWalkTest { | ||
TimedWalkTest(walkTime: 5) | ||
} | ||
|
||
var body: some View { | ||
Button("Display Walk Test") { | ||
displayWalkTest.toggle() | ||
} | ||
.sheet(isPresented: $displayWalkTest) { | ||
NavigationStack { | ||
TimedWalkTestView(timedWalkTest: timedWalkTest) { result in | ||
switch result { | ||
case .completed: | ||
// ... | ||
case .failed: | ||
// ... | ||
case .cancelled: | ||
// ... | ||
} | ||
displayWalkTest = false | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Topics | ||
|
||
### Timed Walk Test | ||
|
||
- ``TimedWalkTest`` | ||
- ``TimedWalkTestView`` | ||
- ``TimedWalkTestViewResult`` | ||
- ``TimedWalkTestResult`` | ||
- ``TimedWalkTestError`` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters