You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Samples/Tutorial/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Nearly all of the code is in the `Frameworks` directory.
13
13
To help with the setup, we have created a few helpers:
14
14
-`TutorialViews`: A set of 3 views for the 3 screens we will be building, `Welcome`, `TodoList`, and `TodoEdit`.
15
15
-`TutorialBase`: This is the starting point to build out the tutorial. It contains view controllers that host the views from `TutorialViews` to see how they display.
16
-
- Additionally, there is a `TutorialContainerViewController` that the AppDelegate sets as the root view controller. This will be our launching point for all of our workflows.
16
+
- Additionally, there is a `TutorialHostingViewController` that the AppDelegate sets as the root view controller. This will be our launching point for all of our workflows.
17
17
-`TutorialFinal`: This is an example of the completed tutorial - could be used as a reference if you get stuck.
Copy file name to clipboardExpand all lines: Samples/Tutorial/Tutorial1.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -125,32 +125,32 @@ extension WelcomeWorkflow {
125
125
}
126
126
```
127
127
128
-
### Setting up the ContainerViewController
128
+
### Setting up the WorkflowHostingController
129
129
130
130
Now we have our `WelcomeWorkflow` rendering a `WelcomeScreen`, and have a view controller that knows how to display with a `WelcomeScreen`. It's time to bind this all together and actually show it on the screen!
131
131
132
-
We'll update the `TutorialContainerViewController` to hold a child *ContainerViewController* that will host our workflow:
132
+
We'll update the `TutorialContainerViewController` to hold a child *WorkflowHostingController* that will host our workflow:
Now, we've created our `ContainerViewController` with the `WelcomeWorkflow` as the root.
153
+
Now, we've created our `WorkflowHostingController` with the `WelcomeWorkflow` as the root.
154
154
155
155
We can finally run the app again! It will look exactly the same as before, but now it is powered by our workflow.
156
156
@@ -294,7 +294,7 @@ Here is what is happening on each keypress:
294
294
295
295
# Summary
296
296
297
-
In this tutorial, we covered creating a Screen, ScreenViewController, Workflow, and binding them together in a ContainerViewController. We also covered the Workflow being responsible for the state of the UI instead of the view controller being responsible.
297
+
In this tutorial, we covered creating a Screen, ScreenViewController, Workflow, and binding them together in a `WorkflowHostingController`. We also covered the Workflow being responsible for the state of the UI instead of the view controller being responsible.
298
298
299
299
Next, we will create a second screen and workflow, and the use composition to navigate between them.
Copy file name to clipboardExpand all lines: Samples/Tutorial/Tutorial2.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Start from the implementation of `Tutorial1` if you're skipping ahead. You can d
12
12
13
13
## Second Workflow
14
14
15
-
Let's add a second screen and workflow so we have somewhere to land after we log in. Our next screen will be a list of "todo" items, as todo apps are the best apps. To see an example, modify the `TutorialContainerViewController` to show the `TodoListSampleViewController`. Once you're done looking around, the `TodoListSampleViewController` can be removed, as we will be replacing it with a screen and workflow.
15
+
Let's add a second screen and workflow so we have somewhere to land after we log in. Our next screen will be a list of "todo" items, as todo apps are the best apps. To see an example, modify the `TutorialHostingViewController` to show the `TodoListSampleViewController`. Once you're done looking around, the `TodoListSampleViewController` can be removed, as we will be replacing it with a screen and workflow.
16
16
17
17
Create a new Screen/ViewController pair called `TodoList`:
18
18
@@ -93,19 +93,19 @@ extension TodoListWorkflow {
93
93
94
94
### Showing the new screen and workflow
95
95
96
-
For now, let's just show this new screen instead of the login screen/workflow. Update the `TutorialContainerViewController` to show the `TodoListWorkflow`:
96
+
For now, let's just show this new screen instead of the login screen/workflow. Update the `TutorialHostingViewController` to show the `TodoListWorkflow`:
Copy file name to clipboardExpand all lines: Samples/Tutorial/Tutorial5.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -652,7 +652,7 @@ class TodoWorkflowTests: XCTestCase {
652
652
653
653
The `RenderTester` allows easy "mocking" of child workflows and workers. However, this means that we are not exercising the full infrastructure (even though we could get a fairly high confidence from the tests). Sometimes, it may be worth putting together integration tests that test a full tree of Workflows.
654
654
655
-
Add another test to `RootWorkflowTests`. We will run the tree of workflows in a `WorkflowHost`, which is what the infrastructure uses for a `ContainerViewController`. This will be a "black box" test, as we can only test the behaviors from the rendering and will not be able to inspect the underlying states. This may be a useful test for validation when refactoring a tree of workflows to ensure they behave the same way.
655
+
Add another test to `RootWorkflowTests`. We will run the tree of workflows in a `WorkflowHost`, which is what the infrastructure uses for a `WorkflowHostingController`. This will be a "black box" test, as we can only test the behaviors from the rendering and will not be able to inspect the underlying states. This may be a useful test for validation when refactoring a tree of workflows to ensure they behave the same way.
0 commit comments