Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import SwiftUI
self.delegate = delegate
}

#if !os(macOS)
#if compiler(>=6.1) && !os(macOS)
@available(iOS 26.0, *)
public func emitPlacementChanged(_ placement: TabViewBottomAccessoryPlacement?) {
var placementValue = "none"
Expand Down
11 changes: 5 additions & 6 deletions packages/react-native-bottom-tabs/ios/TabView/NewTabView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ struct ConditionalBottomAccessoryModifier: ViewModifier {
}

func body(content: Content) -> some View {
#if os(macOS)
// tabViewBottomAccessory is not available on macOS
content
#else
#if compiler(>=6.1) && !os(macOS)
if #available(iOS 26.0, tvOS 26.0, visionOS 3.0, *), bottomAccessoryView != nil {
content
.tabViewBottomAccessory {
Expand All @@ -90,12 +87,14 @@ struct ConditionalBottomAccessoryModifier: ViewModifier {
} else {
content
}
#else
content
#endif
}

@ViewBuilder
private func renderBottomAccessoryView() -> some View {
#if !os(macOS)
#if compiler(>=6.1) && !os(macOS)
if let bottomAccessoryView {
if #available(iOS 26.0, *) {
BottomAccessoryRepresentableView(view: bottomAccessoryView)
Expand All @@ -105,7 +104,7 @@ struct ConditionalBottomAccessoryModifier: ViewModifier {
}
}

#if !os(macOS)
#if compiler(>=6.1) && !os(macOS)
@available(iOS 26.0, *)
struct BottomAccessoryRepresentableView: PlatformViewRepresentable {
@Environment(\.tabViewBottomAccessoryPlacement) var tabViewBottomAccessoryPlacement
Expand Down