Post

Replies

Boosts

Views

Activity

Reply to What is the best way to align an array of dates with another array.
Correct. Ideally 09/08, 09/09 would match with the appropriate day. Here's a pretty bare bones of the code. Sorry I can't get it formatted right @StateObject var planData = DownloadHansonData() @AppStorage("startDate") var userStartDate: Date = Date() @AppStorage("raceDate") var userRaceDate: Date = Date() @State var startDate = Date() @State var endDate = Date() @State var dateRange: [Date] = [] var body: some View { VStack { // ForEach(dateRange, id: \.self) { day in ScrollView { ForEach(planData.trainingdata) { index in HStack { Text("\(index.day0.day) - \(index.day0.exercise)") Spacer() } HStack { Text("\(index.day1.day) - \(index.day1.exercise)") Spacer() } HStack { Text("\(index.day2.day) - \(index.day2.exercise)") Spacer() } HStack { Text("\(index.day3.day) - \(index.day3.exercise)") Spacer() } HStack { Text("\(index.day4.day) - \(index.day4.exercise)") Spacer() } HStack { Text("\(index.day5.day) - \(index.day5.exercise)") Spacer() } HStack { Text("\(index.day6.day) - \(index.day6.exercise)") Spacer() } // } } .padding() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to Swift Testing arm64-apple-ios13.0-simulator
Thank you, is that by default or can it be changed to run on newer targets?
Replies
Boosts
Views
Activity
Oct ’25
Reply to Using Menu in tabViewBottomAccessory
I'll look at adding .contentShape(.rect) Thank you!
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Oct ’25
Reply to Metal is not installed on Xcode 26 on Xcode Cloud
@DTS Engineer Thanks! I'm hitting this as well and just filed. I reproduce this 100% of the time.
Replies
Boosts
Views
Activity
Sep ’25
Reply to Combine Returning Completion error for an API call of nil
Figured this out as an issue with my struct data.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Simulator and preview show two different behaviors using GeometryReader
Sort of figured it out. Has to do when using segmented style picker that throws of geo reader.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to What is the best way to align an array of dates with another array.
I figured it out. Using the below worked            ForEach(planData.trainingdata.prefix(1)) { index in             ForEach(dateRange, id: \.self) { day in
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to What is the best way to align an array of dates with another array.
I think I figured it out sort of, this though iterates through daterange and then planData            ForEach(planData.trainingdata) { index in             ForEach(dateRange, id: \.self) { day in
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to What is the best way to align an array of dates with another array.
Correct. Ideally 09/08, 09/09 would match with the appropriate day. Here's a pretty bare bones of the code. Sorry I can't get it formatted right @StateObject var planData = DownloadHansonData() @AppStorage("startDate") var userStartDate: Date = Date() @AppStorage("raceDate") var userRaceDate: Date = Date() @State var startDate = Date() @State var endDate = Date() @State var dateRange: [Date] = [] var body: some View { VStack { // ForEach(dateRange, id: \.self) { day in ScrollView { ForEach(planData.trainingdata) { index in HStack { Text("\(index.day0.day) - \(index.day0.exercise)") Spacer() } HStack { Text("\(index.day1.day) - \(index.day1.exercise)") Spacer() } HStack { Text("\(index.day2.day) - \(index.day2.exercise)") Spacer() } HStack { Text("\(index.day3.day) - \(index.day3.exercise)") Spacer() } HStack { Text("\(index.day4.day) - \(index.day4.exercise)") Spacer() } HStack { Text("\(index.day5.day) - \(index.day5.exercise)") Spacer() } HStack { Text("\(index.day6.day) - \(index.day6.exercise)") Spacer() } // } } .padding() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21