-
Notifications
You must be signed in to change notification settings - Fork 12
/
data.json
158 lines (158 loc) · 9.56 KB
/
data.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
[
{
"id": 1,
"category": "SwiftUI",
"content": {
"id": 0,
"image": "swiftUI",
"time": "2 hours",
"description": "Discover the innovative and simple way to build apps on Apple platforms, especially iOS.",
"lessons": [
{
"id": 0,
"title": "App Structure and Behaviour",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>Declare your app by creating a structure that conforms to the App protocol and add one or more scenes to it. You can use built-in scenes, like WindowGroup, or you can compose custom scenes that conform to the Scene protocol. Scenes contain the view hierarchies that define the user interface of your app, and have a life cycle that the system manages.</p>"
},
{
"id": 1,
"title": "Views and Controls",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>Views and controls are the visual building blocks of your app's user interface. Use them to present your app's content onscreen. Views represent text, images, shapes, custom drawings, and compositions of any and all of these together. Controls enable user interaction with consistent APIs that adapt to their platform and context. Combine views using containers that specify their visual relationships and hierarchy. Use methods called modifiers to customize the display, behavior, and interactivity of built-in views and those you create for your app.</p>"
},
{
"id": 2,
"title": "View Layout and Presentation",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>Use stacks and lists to lay out the views of your user interface. You can combine static views with views that are dynamically generated from collections of data. All container views update and adjust the positions of their children in response to changes in content or interface dimensions.</p>"
},
{
"id": 3,
"title": "Drawing and Animation",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>Use drawing tools to combine shapes or define custom paths for shapes of your own design. Apply styles from environment-aware colors to rich gradients to the foreground, background, and outline of your shapes.</p>"
},
{
"id": 4,
"title": "Framework Integration",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>Integrate SwiftUI with your app's existing content using:</p><ul><li><p>Hosting controllers to add AppKit, UIKit, or WatchKit views and view controllers to your SwiftUI interfaces. A hosting controller wraps the designated view or view controller and facilitates communication between the wrapped object and your SwiftUI views.</p></li><li><p>Representable objects to add SwiftUI views into your existing AppKit, UIKit, or WatchKit interfaces. A representable object wraps a set of SwiftUI views in a form that you can then add to your storyboard-based app.</p></li></ul>"
},
{
"id": 5,
"title": "State and Data Flow",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>SwiftUI offers a declarative approach to user interface design. As you compose a hierarchy of views, you also indicate data dependencies for the views. When the data changes, either due to an external event or because of an action taken by the user, SwiftUI automatically updates the affected parts of the interface. As a result, the framework automatically performs most of the work traditionally done by view controllers.</p><p>The framework provides tools, like state variables and bindings, for connecting your app's data to the user interface. These tools help you maintain a single source of truth for every piece of data in your app, in part by reducing the amount of glue logic you write.</p>"
},
{
"id": 6,
"title": "Property Wrappers",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>SwiftUI implements many data management types, like State and Binding, as Swift property wrappers. Apply a property wrapper by adding an attribute with the wrapper's name to a property's declaration. The property gains the behavior specified by the wrapper. The state and data flow property wrappers in SwiftUI watch for changes in your data, and automatically update affected views as needed. When you refer directly to the property in your code, you access the wrapped value. Alternatively, you can access a property wrapper's projected value by prefixing the property name with the dollar sign ($). SwiftUI state and data flow property wrappers always project a Binding, which is a two-way connection to the wrapped value, allowing another view to access and mutate a single source of truth.</p>"
},
{
"id": 7,
"title": "Gestures",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>Respond to taps and gestures by adding gesture modifiers to your views. Create custom gestures from individual gestures using the simultaneously(with:), sequenced(before:), or exclusively(before:) modifiers, or combine gestures with keyboard modifiers using the modifiers(_:) modifier.</p>"
},
{
"id": 8,
"title": "Previews",
"video": "SwiftUI%20trimmed.mp4",
"duration": "15 minutes",
"explanation": "<p>Generate dynamic, interactive previews of your custom views. Xcode statically discovers types that conform to the PreviewProvider protocol in your app, and generates previews for each provider it discovers.</p>"
}
]
},
"test": {
"id": 0,
"image": "swiftUI",
"time": "30 minutes",
"description": "Test your knowledge of SwiftUI.",
"questions": [
{
"id": 0,
"content": "<p>Every SwiftUI app has exactly one scene to which contains a view hierarchy.</p>",
"correctIndex": 1,
"answers": [
"true",
"false"
]
},
{
"id": 1,
"content": "<p>How can you customize the display and behaviour of a view in SwiftUI?</p>",
"correctIndex": 2,
"answers": [
"Change it in the storyboard",
"Conform it to the appropriate delegate protocol",
"Using modifiers",
"You can't"
]
},
{
"id": 2,
"content": "<p>Which of the following allows you to display a table?</p>",
"correctIndex": 3,
"answers": [
"VStack",
"HStack",
"ZStack",
"List"
]
},
{
"id": 3,
"content": "<p>You can define custom paths to create shapes in SwiftUI.</p>",
"correctIndex": 0,
"answers": [
"true",
"false"
]
},
{
"id": 4,
"content": "<p>Select the best answer.</p>",
"correctIndex": 3,
"answers": [
"You can add SwiftUI views to a storyboard-based app using representable objects",
"You can add UIKit views to a SwiftUI project using hosting controllers",
"SwiftUI and UIKit are separate, and shouldn't be integrated",
"Answers 1 and 2"
]
},
{
"id": 5,
"content": "<p>In SwiftUI, interfaces are created:</p>",
"correctIndex": 2,
"answers": [
"Procedurally",
"Dynamically",
"Declaratively",
"Eccentrically"
]
},
{
"id": 6,
"content": "<p>Prefixing a property wrapped property with $ will access its",
"correctIndex": 1,
"answers": [
"Wrapped value",
"Projected value",
"Financial value",
"That's invalid syntax"
]
}
]
}
}
]