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
244
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
871
Sep ’21