Any visual layout that incorporates selectable tabs as an organizational element.
Questions tagged [tabview]
770 questions
6
votes
0 answers
Content width of TabView in SwiftUI
I'm trying to add some content insets in TabView with page style. Is it possible to change TabView content width, so it could show a part of next and previous View? I can easily do it with HStack or ScrollView, but I wonder if I can do it with…

krbiz
- 363
- 3
- 12
6
votes
2 answers
How to dismiss a presenting view to the root view of tab view in SwiftUI?
I'm using TabView on my home page. Let's just say I have 4 tabs.
On second tab, i can go to another view using NavigationLink and I go to another 2 views using NavigationLink. Then on the latest view, there is a button to present a view and i use…

Aldo Sugiarto
- 197
- 3
- 20
6
votes
0 answers
Best way to handle a TabView inside a NavigationView in SwiftUI
I am developing an app in Swift with SwiftUI.
I have this setup where I put a TabView inside a NavigationView and used the navigationBarTitle on the tabView. I did this because if I put the NavigationView inside the TabView, I cannot make the Tab…

BountyHunter
- 85
- 2
- 7
6
votes
1 answer
How to list an array of TabView items in SwiftUI?
I have a project where parts of ContentView is supposed to change when different tabs are selected. I have the following struct and the array for the TabView items:
struct TabItem: Identifiable {
var id = UUID()
var title: Text
var…

fankibiber
- 729
- 1
- 6
- 19
6
votes
6 answers
How to lazy load Angular 2 components in a TabView (PrimeNG)?
It is my app.component.ts:
import { Component } from '@angular/core';
@Component({
templateUrl: 'app/app.component.html',
selector: 'my-app'
})
export class AppComponent {
}
And this is my app.component.html:

Marcel
- 2,810
- 2
- 26
- 46
6
votes
6 answers
JSF / PrimeFaces: Navigate from one tab to another
Using Primefaces tab view (), how to navigate from one tab to another tab?
For example:
Tab 1
Go to tab2Tab…

Ranjith
- 2,779
- 3
- 22
- 41
5
votes
0 answers
SwiftUI iOS 16 NavigationPath inside TabView Warning: NavigationAuthority
I have a TabView and each Tab has it's own NavigationPath which I am handling inside an ObservableObject.
@MainActor final class Router: ObservableObject {
@Published var homeNavigationPath = NavigationPath()
@Published var…

Dan
- 543
- 2
- 13
5
votes
2 answers
How to dynamically add and remove a tab in p:tabView component
I am trying to add a PrimeFaces dynamically. While adding the second tab I am getting the following exception:
"java.lang.IllegalStateException: Component ID tab0 has already been found in the view".
How can I solve this?
Here is the view…

janasoft
- 163
- 2
- 3
- 12
5
votes
0 answers
SwiftUI - Disabling Button Highlight on Swipe
I'm dealing with a simple button in SwiftUI layed out as follows:
TabView {
ForEach(...) { ...
Button {...}
label {...}
}
}
When I tap (but do not release) the button, it highlights the button by default; this is fine. However, if I…

Nicolas Gimelli
- 695
- 7
- 19
5
votes
1 answer
How to change filled icon to not filled on TabView tabItem in iOS 15 Xcode 13?
How can i change filled icon to not filled on TabView tabItem in iOS 15 Xcode 13?
It seems now that the icons are filled by default...
My code :
import SwiftUI
struct Test_Home_V: View {
var body: some View {
TabView {
…

Flincorp
- 751
- 9
- 22
5
votes
1 answer
How to stop the page from being able to be scrolled up and down while using a paged tab view in swiftUI
I am trying to build an app that shows different days of the week in a paged tab view, but when I scroll sideways to a day (e.g. Tuesday), I can scroll it up and down as if it was a scroll view. I don't have a scroll view in my content view.
My code…

Boat-bold647
- 61
- 3
5
votes
2 answers
NavigationView inside a TabView Swift UI
I'm just picking up SwiftUI after a long break but I don't understand why I can't place a Navigation View within a Tab View.
I want my Navigation View to be a .tabItem so the view appears as part of the main app navigation so I'm trying this…

nc14
- 539
- 1
- 8
- 26
5
votes
0 answers
SwiftUI TabView Animation Not giving any animation
I'm trying to create a TabView Slider in SwiftUI with 3 modals that will onboard a user. The default PageTabViewStyle() is a little basic and I'm wanting it to animate with the default slide speed etc.
I've tried appending animation along with the…

832049823
- 91
- 6
5
votes
1 answer
SwiftUI 2.0 - TabView tab bar colors don't respect the current color scheme (dark or light mode)
I'm desperately trying to have my tab bar colors respect the current color scheme.
When the app is launched, the Colors are correct. But if I toggle dark and light mode, the colors don't switch back to the correct ones. The light mode colors are…

alpennec
- 1,864
- 3
- 18
- 25
5
votes
1 answer
Why does SwiftUI's TabView rotation to landscape jump to random tab-number?
Using Swift 5.3.2, Xcode 12.4, iOS 14.4,
I am trying to make a simple Page-TabView in SwiftUI (see below code-excerpt).
When rotating to Landscape or back to Portrait, there is a problem (see video):
Whenever I rotate my iPhone, the TabView "jumps"…

iKK
- 6,394
- 10
- 58
- 131