Apple App Development with Swift Certified User - App-Development-with-Swift-Certified-User Exam Practice Test
Which property wrapper allows you to read data from the system or device settings?
Correct Answer: B
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Given the function definition, which two statements call the function correctly? (Choose 2.)

Based on the image provided, here is the text for each of the multiple-choice options:

Based on the image provided, here is the text for each of the multiple-choice options:
Correct Answer: A,E
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Which code correctly creates a size 300 rectangular Image View with rounded corners that displays the entire image, regardless of size?
Correct Answer: D
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Review the code snippet.

The code snippet does not compile.
Which two actions will fix the errors? (Choose 2.)

The code snippet does not compile.
Which two actions will fix the errors? (Choose 2.)
Correct Answer: A,C
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Drag the views on the left to the correct locations m the code on the fight to match the shown canvas.
You may use each View once, more than once, or not at all.


You may use each View once, more than once, or not at all.


Correct Answer:

Explanation:
* RedCircleView()
* GreenTriangleView()
* BlueSquareView()
* BlueSquareView()
* GreenTriangleView()
This question belongs to View Building with SwiftUI , specifically arranging views with HStack , VStack , and ZStack . In SwiftUI, an HStack lays views out horizontally, a VStack lays them out vertically, and a ZStack overlays views front-to-back. Apple's stack layout guidance describes these three containers exactly this way.
To match the canvas, the main HStack must show three items from left to right: a red circle , a green triangle
, and then a right-side vertical group. That means the first two blanks inside HStack are RedCircleView() and GreenTriangleView(). On the right side, the VStack shows a blue square on top, so the next blank is BlueSquareView(). Under that, the lower-right shape is made by layering a green triangle on top of a blue square , which means the ZStack must contain BlueSquareView() first as the background and GreenTriangleView() second as the foreground. SwiftUI's documentation notes that ZStack aligns and overlays its children in depth order, which is why the square goes before the triangle.
So the correct placement order is:
HStack {
RedCircleView()
GreenTriangleView()
VStack {
BlueSquareView()
ZStack {
BlueSquareView()
GreenTriangleView()
}
}
}
That arrangement reproduces the exact layout shown in the canvas.