import SwiftUI
struct AppClipWelcomeView: View {
var body: some View {
VStack(spacing: 20) {
Text("App Clip")
.font(.largeTitle)
.fontWeight(.bold)
.multilineTextAlignment(.center)
Text("Welcome to our App!")
.font(.title3)
.multilineTextAlignment(.center)
Button(action: {
print("Open full app tapped")
}) {
Text("Open Full App")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(10)
}
.accessibilityLabel("Open Full App Button")
}
.padding()
}
}
struct AppClipWelcomeView_Previews: PreviewProvider {
static var previews: some View {
AppClipWelcomeView()
}
}This SwiftUI view uses a vertical stack (VStack) to arrange the title, message, and button vertically with spacing.
The title uses a large bold font and is centered. The welcome message uses a smaller title font and is also centered.
The button has a blue background with white text and rounded corners to look tappable. When tapped, it prints a message to the console.
Accessibility label is added to the button for screen readers.
Padding is added around the content for spacing from screen edges.