Post

Replies

Boosts

Views

Activity

Using Menu in tabViewBottomAccessory
I'm trying to use menu in tabViewBottomAccessory to present a menu of options and I'm finding that the tap is only registered if the text is tapped any taps outside of the text is not registered. Is there a way to get the whole button to register? TabView(selection: $entryManager.currentTab) { Tab("Home", systemImage: "circle.hexagonpath.fill", value: .home) { SomeView() } .tabViewBottomAccessory { Menu("Post Review") { // MARK: Submit Other Button(action: { } ) { Label("Submit Other", systemImage: "building.2.fill") } Button(action: { } ) { Label("Submit Bed", systemImage: "bed.double.fill") } } }
Topic: UI Frameworks SubTopic: SwiftUI
2
0
280
Oct ’25
What is the best way to align an array of dates with another array.
I'm racking my head here trying to figure out the best way to do this, but I have two arrays. One array is a range of dates and another is a return of data. Here's the function that returns an array of dates func numberOfDaysBetween(startDate: Date, raceDate: Date) -> [Date] {   let numberOfDays = Calendar.current.dateComponents([.day], from: startDate, to: raceDate).day!   let week = (-numberOfDays...0).compactMap {    Calendar.current.date(byAdding: .day, value: $0, to: raceDate)   }   return week } I'm trying to get the dates to align to the weekdays listed here. https://api.npoint.io/6a55ea69409d7f3d90b4. Would a ZStack be appropriate here?
4
0
905
Sep ’21
Using Menu in tabViewBottomAccessory
I'm trying to use menu in tabViewBottomAccessory to present a menu of options and I'm finding that the tap is only registered if the text is tapped any taps outside of the text is not registered. Is there a way to get the whole button to register? TabView(selection: $entryManager.currentTab) { Tab("Home", systemImage: "circle.hexagonpath.fill", value: .home) { SomeView() } .tabViewBottomAccessory { Menu("Post Review") { // MARK: Submit Other Button(action: { } ) { Label("Submit Other", systemImage: "building.2.fill") } Button(action: { } ) { Label("Submit Bed", systemImage: "bed.double.fill") } } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
2
Boosts
0
Views
280
Activity
Oct ’25
Swift Testing arm64-apple-ios13.0-simulator
I'm working on moving XCTests to Swift Testing and trying to understand why it shows Testing Library Version: 102 (arm64-apple-ios13.0-simulator) when running. Why iOS 13?
Replies
3
Boosts
0
Views
288
Activity
Oct ’25
What is the best way to align an array of dates with another array.
I'm racking my head here trying to figure out the best way to do this, but I have two arrays. One array is a range of dates and another is a return of data. Here's the function that returns an array of dates func numberOfDaysBetween(startDate: Date, raceDate: Date) -> [Date] {   let numberOfDays = Calendar.current.dateComponents([.day], from: startDate, to: raceDate).day!   let week = (-numberOfDays...0).compactMap {    Calendar.current.date(byAdding: .day, value: $0, to: raceDate)   }   return week } I'm trying to get the dates to align to the weekdays listed here. https://api.npoint.io/6a55ea69409d7f3d90b4. Would a ZStack be appropriate here?
Replies
4
Boosts
0
Views
905
Activity
Sep ’21