Questions tagged [swiftui-tabview]

For questions about TabView - a component in Apple's SwiftUI framework that switches between multiple child views using interactive user interface elements. When using this tag also include the more generic [swiftui] tag where possible.

Links:

  • Apple Developer Documentation for TabView.
325 questions
0
votes
1 answer

Is there a good solution to use a TabView inside a NavigationView?

At first I know that for a good working environment the NavigationView should be inside the TabView, but the thing is I have to declare the NavigationView a few steps before you come to the TabBarView because first you have to complete a…
SCH361
  • 41
  • 1
  • 7
0
votes
0 answers

TabView tabBar tint color not working as expected in SwiftUI

I’m going through a Ray Wenderlich course on SwiftUI and currently working on some TabView view. The method for setting the tabBar tint color used in the course is accentColor(_:) which sets the tabBar tint color. However, that method is now…
andre
  • 773
  • 1
  • 6
  • 16
0
votes
0 answers

SwiftUI View Overlap when integrated with Drag gesture

I am new to swiftUI and facing an issue when working with DragGesture functionality of view. I am trying to create a photo gallery app which have swipe functionality. Facing an issue with having a gesture view embedded in HStack with other 2 views.…
0
votes
0 answers

Color of buttons in TabView

I am specifically using the "non-filled" SF symbols in my code, however the symbols are still filled regardless of what I do. I am sure that it is because of one of the background/foreground color presets in the init method, but I cannot figure out…
0
votes
1 answer

SwiftUI, AppStorage and using Picker in TabViews

I am trying to save a small amount of data with picker using AppStorage across multiple views. However the issue I'm running into is that when I select one value and link to AppStorage it changes the value for all the others. What I want is to save…
Laren
  • 37
  • 1
  • 8
0
votes
2 answers

NavigationView scrolling broken when using TabView

With the below code I get a very weird scrolling behaviour in my TabViews, LoginView is called on app launch: struct LoginView: View { @State private var presentContent = false var body: some View { return…
Max B
  • 193
  • 1
  • 15
0
votes
1 answer

Page indicator in tabview swiftui

I'am using tabView to display some onboarding screens in my app. I was using .onAppear() { UIPageControl.appearance().currentPageIndicatorTintColor = .black UIPageControl.appearance().pageIndicatorTintColor = .gray …
Ae Ri
  • 185
  • 1
  • 12
0
votes
1 answer

How do I update the data in the tabview after the one-to-many coredata has been modified?

Purpose I want to update the data in the tabview automatically when I return to the RootView after I rename the tag name in the tagManagemenView. Current Status When I do delete operation in the TagManagementView, the RootView is able to update…
IDTIMW
  • 217
  • 2
  • 14
0
votes
1 answer

How to set the height of the PageTabView

I want to show some images in pageTabView.But the image size image is compressed. How do I control the size. My image is requested from the server. struct TextView: View { var body: some View { ScrollView(.vertical, showsIndicators:…
jiaoxiaker
  • 23
  • 3
0
votes
1 answer

SwiftUI How to Remove TabViewController

i've created a TabView for my photos collection. But i confused how can i remove this TabView controller Thank you for everyone who answered my question
Bill Rei
  • 333
  • 3
  • 14
0
votes
0 answers

navigationLink to tag in another view

Here's an edited version of the question. I'm working in Swiftui and I have two views. The first has two NavigationLinks. The second link is where I get stuck. I would like that link to go to 'tabTwo' on PageTwo. Getting to PageTwo isn't an issue...…
0
votes
1 answer

TabView freezes when navigating back to initial tab

I have my ContentView with 2 tabs. struct ContentView: View { var formViewModel = ViewModel() var body: some View { TabView { HomeTab() .environmentObject(formViewModel) .tabItem { …
Fitzgerald Afful
  • 123
  • 1
  • 15
0
votes
1 answer

Swiftui nested navigation issue while using navigation link

My swiftui application structure looks like this Navigation View (enclosing the landing view that is a list view ) On selection of a List item Navigation link directs to a Tab View with three tabs (default first tab) When I use a sole standalone…
0
votes
0 answers

SwiftUI - Error with content in a view component

I'm trying to build a reusable navigation tab in SwiftUI and I'm facing some challenges. I come from ReactJS and wanted to create a component that I can pass the tab images and the different views. This is the code I have so far which works pretty…
0
votes
0 answers

SwiftUI Tab Bar inconsistent BackgroundColor

Here's my view struct StackCheck: View { var rows = [Int](0...20) var body: some View { TabView { List { ForEach(rows, id: \.self) { _ in Text("Hello, World!") } …
boring_ape
  • 59
  • 3