import SwiftUI
struct ImageViewScreen: View {
var body: some View {
VStack(spacing: 40) {
Image(systemName: "star.fill")
.resizable()
.scaledToFit()
.frame(width: 100, height: 100)
.foregroundColor(.blue)
Image("exampleImage")
.resizable()
.scaledToFit()
.frame(width: 150, height: 150)
}
.padding()
}
}
struct ImageViewScreen_Previews: PreviewProvider {
static var previews: some View {
ImageViewScreen()
}
}
We use a VStack to stack the two images vertically with spacing of 40 points for clear separation. The system image uses Image(systemName: "star.fill"), which is resizable and scaled to fit a 100x100 frame, and tinted blue with foregroundColor(.blue). The asset image named "exampleImage" is also resizable and scaled to fit a 150x150 frame to show the image properly without distortion. Padding is added around the VStack for spacing from screen edges.