Complete the code to set the frame width of the Text view to 200 points.
Text("Hello World") .frame(width: [1])
The frame(width:) modifier sets the width of the view. Here, 200 points is the correct width.
Complete the code to set both width and height of the Rectangle to 100 points.
Rectangle()
.frame(width: [1], height: [2])Setting both width and height to 100 points makes the rectangle a square of 100x100.
Fix the error in the code by completing the frame modifier to set a fixed height of 50 points.
Circle()
.frame(height: [1])The height parameter expects a number without quotes. Use 50 as a number.
Fill both blanks to set the frame width to 150 and height to 75 points for the Text view.
Text("SwiftUI") .frame(width: [1], height: [2])
The width is set to 150 points and the height to 75 points using the frame modifier.
Fill all three blanks to create a frame with width 120, height 80, and center alignment.
Image(systemName: "star") .frame(width: [1], height: [2], alignment: [3])
The frame is set with width 120, height 80, and the alignment is centered using .center.