Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
32 votes
2 answers
12k views

I have the following code but can't seem to remove the dots at the bottom of the TabView. struct ContentView: View { @Environment(\.managedObjectContext) private var viewContext @State ...
alionthego's user avatar
30 votes
3 answers
3k views

I am experiencing very odd behavior in SwiftUI 2.0 and iOS14. When the keyboard appears on the screen, the OnAppear method of other tab's view called automatically. However, this works fine Xcode 11.7 ...
Malav Soni's user avatar
  • 2,888
19 votes
7 answers
19k views

I have a TabView and separate NavigationView stacks for every Tab item. It works well but when I open any NavigationLink the TabView bar is still displayed. I'd like it to disappear whenever I click ...
pawello2222's user avatar
  • 55.6k
19 votes
4 answers
15k views

I would like to run a function each time a tab is tapped. On the code below (by using onTapGesture) when I tap on a new tab, myFunction is called, but the tabview is not changed. struct DetailView: ...
Daniele B's user avatar
  • 20.6k
19 votes
6 answers
9k views

I have a TabView in SwiftUI in the PageViewTabStyle so i can swipe from page to page. I'd like to have a setting that "locks" the current view in place, so the user cannot swipe. Googling ...
Hoopes's user avatar
  • 4,245
14 votes
3 answers
20k views

Apple's iOS 26 "Liquid Glass" introduces a new UI paradigm of a tab bar with a separate floating action button off to the side. This seems to be a common UI design used in many of Apple's ...
pkamb's user avatar
  • 35.5k
12 votes
2 answers
9k views

I'm trying to keep track of what page the user is on in a TabView that is PageTabViewStyle in SwiftUI but I can't figure out the best way to keep track of the page index? Using .onAppear doesn't work ...
GarySabo's user avatar
  • 6,830
12 votes
2 answers
5k views

I'm trying to implement TabView in SwiftUI that has the same color as screen background but also has a shadow above it like in this picture: So far I've been able to properly display color, but I don'...
Ella Gogo's user avatar
  • 1,291
12 votes
2 answers
4k views

For some reason updating the selection does not update the selected tab in this very simple example. My expectation would be that it would show Tab 1 initially, and when I press the Toggle Tab button,...
skajake's user avatar
  • 478
12 votes
2 answers
3k views

I'm trying to detect a Long Press gesture on TabView that's swipable. The issue is that it disables TabView's swipable behavior at the moment. Applying the gesture on individual VStacks didn't work ...
Kirill's user avatar
  • 909
12 votes
1 answer
4k views

TabView(selection: $vm.selectedTab) { PlanCard_PositiveDay(vm: vm).tag(0) PlanCard_CountdownDay().tag(1) PlanCard_Basalkcal().tag(2) PlanCard_ActivityDiet().tag(3) PlanCard_Schedule()....
wanbo's user avatar
  • 968
12 votes
1 answer
2k views

My app has a TabView (PageTabViewStyle) and within each tab is a UIViewRepresentable. I have simplified the code to produce a minimum reproducible example below. The problem is that makeUIView is ...
nicksarno's user avatar
  • 4,285
11 votes
1 answer
10k views

I would like to change the value of a text when the active tab of a TabView changes. I tried using onChange(of: activeTab, perform: {}) to change the value of the state variable that stores the text ...
derivmug's user avatar
  • 221
11 votes
2 answers
10k views

For the reason outlined in the answer outlined in this question SwiftUI TabView brightness views vertical location the menu structure for my app is NavigationView -> TabView -> sub view with ...
John Sorensen's user avatar
11 votes
3 answers
6k views

I am trying to create a macOS app with SwiftUI. I need a TabView or something similar, but when I use TabView the segmented control is not in the macOS Toolbar. Here is an example of what I would like:...
NG235's user avatar
  • 1,300

15 30 50 per page
1
2 3 4 5
28