@@ -152,21 +152,7 @@ adding `.gesture(DragGesture ...)` at the end of your board view.
...
@@ -152,21 +152,7 @@ adding `.gesture(DragGesture ...)` at the end of your board view.
## Task 6: TabView
## Task 6: TabView
You should create a `TabView` in your ContentView.swift, and include
You should create a `TabView` in your ContentView.swift, and include
three views inside the TabView. The first one should be your board
three views inside the TabView. The first one should be your board
view, and we will work on the second and third views later on. Your
view, and we will work on the second and third views later on.
`TabView` should be implemented like this:
```
TabView {
Board().tabItem {
Label("Board", systemImage: "gamecontroller")
}
Scores().tabItem {
Label("Scores", systemImage: "list.dash")
}
About().tabItem {
Label("About", systemImage: "info.circle")
}
}
```
## Task 7: Implement the *HighScores* Page
## Task 7: Implement the *HighScores* Page
### For Model:
### For Model:
...
@@ -197,8 +183,8 @@ struct Score: Hashable {
...
@@ -197,8 +183,8 @@ struct Score: Hashable {
### For View:
### For View:
You should:
You should:
- Create a new file called "Scores.swift", and create a view controller called `Scores`
- Create a new file called "Scores.swift", and create a view called `Scores`.
- Include a `List View` in this view controller, you should use `ForEach` to traversal through the Score list we just created in the model to show the data of each game. You should include the rank, the score, and the date time of each data point.
- Include a `List View` in this view, and use `ForEach` to traversal through the Score list we just created in the model to show the data of each game. You should include the rank, the score, and the date time of each data point.
**Important** The score should be sorted from high to low on the list. The data time can be any format, but should include all the information of "hour, minute, second, date and year'.
**Important** The score should be sorted from high to low on the list. The data time can be any format, but should include all the information of "hour, minute, second, date and year'.