Hello,
When I make a simple application using TabView, the RTL feature is malfunctioning in the TabView page structure.
This is an Apple Bug I guess.
Do you have any suggested solution?
import SwiftUI
struct ContentView: View {
@State private var selectedTab = 0
@Environment(\.layoutDirection) var direction
var body: some View {
VStack {
TabView(selection: $selectedTab){
Text("First Page")
.tag(0)
Text("Second Page")
.tag(1)
Text("Third Page")
.tag(2)
}
.frame(width: 300, height: 500)
.tabViewStyle(PageTabViewStyle())
.background(Color.purple)
.cornerRadius(15)
.environment(\.layoutDirection, .rightToLeft)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}