in training for the day view, i want to align the vstack to the bottom and the text to…
- User
in training for the day view, i want to align the vstack to the bottom and the text to the top trailing
// // ExercisesForTheDayView.swift // FitHabibi // // Created by Maaz Surti on 06/10/24. //
import SwiftUI
struct ExercisesForTheDayView: View { var body: some View { NavigationStack{ CustomNavBar(title: "8th Aug - Upper Body", showGreyBackground: true) { VStack{ TrainingOfTheDayView() .padding(.top, 20) .padding(.horizontal, 20) } } } } }
struct TrainingOfTheDayView: View { var body: some View { ZStack { Image(.workout3) .resizable() .aspectRatio(388/238, contentMode: .fit) VStack(spacing: 4){ HStack(spacing: 0){ Text("Upper body") .font(.customFont(.medium, size: 14)) .foregroundStyle(AppColors.primary) Spacer() Text("1:00 PM - 2:00 PM") .font(.customFont(.medium, size: 14)) .foregroundStyle(AppColors.primary) } HStack(spacing: 20){ HStack(spacing: 4) { Image(.clock) Text("60 minutes") .font(.customFont(.light, size: 12)) .foregroundStyle(.white) } HStack(spacing: 4) { Image(.fire) Text("1320 calories") .font(.customFont(.light, size: 12)) .foregroundStyle(.white) } HStack(spacing: 4) { Image(.runningMan) .renderingMode(.template) .foregroundStyle(.white) .frame(width: 10, height: 10) Text("4 exercises") .font(.customFont(.light, size: 12)) .foregroundStyle(.white) } } } .padding(.horizontal, 20) .background() { AppColors.gray } Text("Training of the day") .font(.customFont(.medium, size: 9)) .foregroundStyle(.black) .padding(.horizontal, 12) // Inner horizontal padding .padding(.vertical, 2) // Inner vertical padding .background(AppColors.primary) .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft]) } } }
- Assistant