import SwiftUI
struct SimulatorUsageView: View {
var body: some View {
VStack(alignment: .leading, spacing: 10) {
Text("Simulator Usage Guide")
.font(.title)
.padding(.bottom, 20)
Text("1. Open Xcode")
Text("2. Select a Simulator")
Text("3. Build and Run your app")
Text("4. Interact with the app")
Spacer()
Button(action: {
print("Simulator opened")
}) {
Text("Open Simulator")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(8)
.padding(.horizontal)
}
}
.padding()
}
}
struct SimulatorUsageView_Previews: PreviewProvider {
static var previews: some View {
SimulatorUsageView()
}
}This screen uses a vertical stack (VStack) to arrange the title, steps, and button vertically.
The title uses a larger font and some padding for spacing.
The steps are simple Text views with numbers to guide the user.
The button is styled with a blue background, white text, and rounded corners to look clickable.
When the button is tapped, it prints a message to the console to simulate opening the simulator.