diff --git a/Features.xcodeproj/project.xcworkspace/xcuserdata/stuart.minchington@saucelabs.com.xcuserdatad/UserInterfaceState.xcuserstate b/Features.xcodeproj/project.xcworkspace/xcuserdata/stuart.minchington@saucelabs.com.xcuserdatad/UserInterfaceState.xcuserstate index 3783080..3563f31 100644 Binary files a/Features.xcodeproj/project.xcworkspace/xcuserdata/stuart.minchington@saucelabs.com.xcuserdatad/UserInterfaceState.xcuserstate and b/Features.xcodeproj/project.xcworkspace/xcuserdata/stuart.minchington@saucelabs.com.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Features/APICallsView.swift b/Features/APICallsView.swift index 5e3c8d2..a75919f 100644 --- a/Features/APICallsView.swift +++ b/Features/APICallsView.swift @@ -25,7 +25,7 @@ struct APICallsView: View { Button(action: { sendRequests() }) { - Text("Send 25 GET Requests") + Text("Generate Network Traffic") .padding() .background(isRequesting ? Color.gray : Color.blue) .foregroundColor(.white) diff --git a/Features/PromotionBanner.swift b/Features/PromotionBanner.swift new file mode 100644 index 0000000..2746702 --- /dev/null +++ b/Features/PromotionBanner.swift @@ -0,0 +1,7 @@ +// +// PromotionBanner.swift +// Features +// +// Created by Stuart Minchington on 2/4/26. +// + diff --git a/Features/TextFieldView.swift b/Features/TextFieldView.swift index aa0fa93..eb195af 100644 --- a/Features/TextFieldView.swift +++ b/Features/TextFieldView.swift @@ -2,32 +2,92 @@ import SwiftUI struct TextFieldView: View { @State private var inputText = "" + @State private var showBanner = false @Environment(\.presentationMode) var presentationMode var body: some View { - VStack { - TextField("Enter your text here", text: $inputText) - .textFieldStyle(.roundedBorder) + ZStack(alignment: .bottom) { + VStack { + TextField("Enter your text here", text: $inputText) + .textFieldStyle(.roundedBorder) + .padding() + + Button("Submit") { + // Handle the submitted text here + print("Submitted text: \(inputText)") + } .padding() + .background(Color(red: 0, green: 0, blue: 0.5)) + .foregroundStyle(.white) + .clipShape(Capsule()) - Button("Submit") { - // Handle the submitted text here - print("Submitted text: \(inputText)") + Button("Back") { + presentationMode.wrappedValue.dismiss() + } + .padding() + .background(Color(red: 0.5, green: 0, blue: 0)) + .foregroundStyle(.white) + .clipShape(Capsule()) } .padding() - .background(Color(red: 0, green: 0, blue: 0.5)) - .foregroundStyle(.white) - .clipShape(Capsule()) - Button("Back") { - presentationMode.wrappedValue.dismiss() + if showBanner { + PromotionalBannerView() + .transition(.move(edge: .bottom)) } - .padding() - .background(Color(red: 0.5, green: 0, blue: 0)) - .foregroundStyle(.white) + } + .onAppear { + DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { + withAnimation(.easeInOut(duration: 0.6)) { + showBanner = true + } + } + } + } +} + +struct PromotionalBannerView: View { + var body: some View { + VStack(spacing: 20) { + Text("Special Offer!") + .font(.title2) + .fontWeight(.bold) + .foregroundStyle(.white) + + Text("Unlock exclusive features and save big today!") + .font(.body) + .multilineTextAlignment(.center) + .foregroundStyle(.white.opacity(0.9)) + + Button("Claim Now") { + // Handle offer claim + } + .padding(.horizontal, 32) + .padding(.vertical, 12) + .background(Color.white) + .foregroundStyle(Color(red: 0, green: 0.55, blue: 0.2)) .clipShape(Capsule()) + .fontWeight(.bold) } - .padding() + .padding(.horizontal, 24) + .padding(.top, 32) + .padding(.bottom, 48) + .frame(maxWidth: .infinity) + .background( + UnevenRoundedRectangle( + topLeadingRadius: 24, + bottomLeadingRadius: 0, + bottomTrailingRadius: 0, + topTrailingRadius: 24 + ) + .fill( + LinearGradient( + colors: [Color(red: 0, green: 0.7, blue: 0.3), Color(red: 0, green: 0.45, blue: 0.2)], + startPoint: .top, + endPoint: .bottom + ) + ) + ) } }