You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried placing the .popover in several places on the tab view but i can't seem to get it to show. I am trying to get the popover with the "arrow" down to appear over a tab so i can "show" users what to do in my app.
Here is a snippet of my code, this is my most recent attempt: TabView(selection: $selectedTab) { HomeView(showPopup: $showWelcomePopup) .tabItem { Label("Home", systemImage: "house") } .tag(0) AnimalListView(showHatchingView: $showHatchingView, refreshList: $refreshAnimalList) .tabItem { Label { Text("My Animals") } icon: { Image(systemName: "hare") } } .popover( present: $showAnimalsPopup, attributes: { $0.sourceFrameInset.top = -8 $0.position = .absolute( originAnchor: .top, popoverAnchor: .bottom ) } ) { Templates.Container( arrowSide: .bottom(.mostClockwise), backgroundColor: .green ) { Text("This is a pretty standard-looking popover with an arrow.") .foregroundColor(.white) } .frame(maxWidth: 300) } .tag(1) }
The text was updated successfully, but these errors were encountered:
I've tried placing the .popover in several places on the tab view but i can't seem to get it to show. I am trying to get the popover with the "arrow" down to appear over a tab so i can "show" users what to do in my app.
Here is a snippet of my code, this is my most recent attempt:
TabView(selection: $selectedTab) { HomeView(showPopup: $showWelcomePopup) .tabItem { Label("Home", systemImage: "house") } .tag(0) AnimalListView(showHatchingView: $showHatchingView, refreshList: $refreshAnimalList) .tabItem { Label { Text("My Animals") } icon: { Image(systemName: "hare") } } .popover( present: $showAnimalsPopup, attributes: { $0.sourceFrameInset.top = -8 $0.position = .absolute( originAnchor: .top, popoverAnchor: .bottom ) } ) { Templates.Container( arrowSide: .bottom(.mostClockwise), backgroundColor: .green ) { Text("This is a pretty standard-looking popover with an arrow.") .foregroundColor(.white) } .frame(maxWidth: 300) } .tag(1) }
The text was updated successfully, but these errors were encountered: