Quiz Summary
0 of 14 Questions completed
Questions:
Information
You must fill out this field. | |
You must fill out this field. | |
You must fill out this field. |
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 14 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
Pos. | Name | Entered on | Points | Result |
---|---|---|---|---|
Table is loading | ||||
No data available | ||||
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- Current
- Review
- Answered
- Correct
- Incorrect
- Question 1 of 14
1. Question
Try to fix the the following code snippet to achieve the result shown on the right:
ZStack(alignment: .bottom) { ResizableImage(name: "meditation") HStack { Text("13min").bold() Text("Custom session") Button { } label: { Text("Start") } .buttonStyle(.borderedProminent) } .foregroundStyle(.white) .padding(20) }
CorrectIncorrect - Question 2 of 14
2. Question
Which code snippet creates this view?
CorrectIncorrect - Question 3 of 14
3. Question
How can you control the order of views in a ZStack?
CorrectIncorrect - Question 4 of 14
4. Question
Try to fix the the following code snippet to achieve the result shown on the right:
ZStack(alignment: ) { ResizableImage(name: "dog") .cornerRadius(20) .frame(width: 200) Image(systemName: "heart.fill") .font(.system(size: 40)) .bold() .foregroundStyle(.pink) .padding(10) }
CorrectIncorrect - Question 5 of 14
5. Question
What is the purpose of a
Divider
in SwiftUI?CorrectIncorrect - Question 6 of 14
6. Question
You have an image and a text that you have to align to each other. Your task is to select the right stack for each outcome!
??? { Image(systemName: "paperclip.circle.fill") Text("Paperclips") }
Sort elements
- HStack(alignment: .bottom) { … }
- VStack { … }
- VStack(alignment: .leading) { … }
- HStack { … }
CorrectIncorrect - Question 7 of 14
7. Question
When should you use a
VStack
in SwiftUI?CorrectIncorrect - Question 8 of 14
8. Question
How can you customize the spacing between views in a
VStack
?CorrectIncorrect - Question 9 of 14
9. Question
How can you customize the alignment of views within an
HStack
?CorrectIncorrect - Question 10 of 14
10. Question
Reorder the code snippets to recreate the following view:
- VStack {
- Text("3")
- HStack {
- Text("Inventory")
- Label("Paperclips", systemImage: "paperclip.circle.fill")
- } }
- .font(.title)
View Answers:
CorrectIncorrect - Question 11 of 14
11. Question
What is the default alignment for views within an
HStack
in SwiftUI?CorrectIncorrect - Question 12 of 14
12. Question
How can you center-align views within a VStack or HStack using spacers?
CorrectIncorrect - Question 13 of 14
13. Question
Try to fix the following code snippet to achieve the result shown on the right. You can use a Spacer(), select which position you would place the Spacer to achieve this:
:
ResizableImage(name: "meditation") .overlay { VStack(alignment: .leading) { Label("Mindfulness", systemImage: "person") .foregroundStyle(.mint) ---> A HStack { Text("13min").bold() ---> B Text("Custom session") Spacer() Button { } label: { Text("Start") } .buttonStyle(.borderedProminent) } .foregroundStyle(.white) ---> C } .padding(20) }
CorrectIncorrect - Question 14 of 14
14. Question
Try to fix the the following code snippet to achieve the result shown on the right:
ZStack(alignment: ) { ResizableImage(name: "dog") Text("Say Hello to your new best friend!") .font(.title) .bold() .foregroundStyle(.white) .padding(20) }
CorrectIncorrect