---
title: "Transparent bar backgrounds"
canonical_url: "https://www.nutrient.io/guides/ios/troubleshooting/user-interface/transparent-bar-backgrounds/"
md_url: "https://www.nutrient.io/guides/ios/troubleshooting/user-interface/transparent-bar-backgrounds.md"
last_updated: "2026-06-08T15:36:25.015Z"
description: "Solutions for common issues and errors in Nutrient iOS SDK with debugging tips and workarounds."
---

Before iOS 26 or when using [`UIDesignRequiresCompatibility`](https://developer.apple.com/documentation/BundleResources/Information-Property-List/UIDesignRequiresCompatibility) on iOS 26, toolbars on iOS have transparent backgrounds by default unless a scroll view is scrolled underneath the bar. This applies to navigation bars, bottom toolbars, and tab bars. With the new design on iOS 26 and later, there is an edge effect if there is a scroll view present behind a bar.

However, to provide a more immersive viewing experience, [`PDFView`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfview) and [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller) show content underneath bars and allow the user to tap to hide the navigation bar. Therefore, using bars with transparent backgrounds isn’t supported. This is only an issue on iOS 18 or earlier. With the new design on iOS 26 and later, this is not an issue because the edge effect is added by default.

Internally, [`PDFView`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfview) uses the `toolbarBackground(_:for:)` modifier to set a visible background for navigation bars and tab bars.

[`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller) will automatically enable visible bar backgrounds in these simpler setups:

- For the navigation bar if [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller) is a direct child of a `UINavigationController`.

- For the navigation bar if [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller)’s parent is a direct child of a `UINavigationController` and [`useParentNavigationBar`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfiguration/useparentnavigationbar) is enabled in the [`PDFConfiguration`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfiguration).

- For the tab bar if [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller) is a direct child of a `UITabBarController`.

With other setups, you may see missing bar backgrounds, resulting in document content being displayed underneath bars like what’s shown below.![Screenshot showing the title and buttons in bars overlapping document content, which makes everything hard to read.](@/assets/guides/ios/troubleshooting/user-interface/transparent-bar-backgrounds/bad-transparent-bars.png)

To fix a transparent bottom toolbar in SwiftUI, use the `.toolbarBackground(_:for:)` modifier. In the iOS 18 SDK, this has been renamed to `toolbarBackgroundVisibility(_:for:)`:

```swift

PDFView(document: document).toolbarBackground(.visible, for:.bottomBar)

```

To fix transparent bars with UIKit, disable transparent bar backgrounds by setting `scrollEdgeAppearance` and `compactScrollEdgeAppearance` to be the same as `standardAppearance` and `compactAppearance` on the navigation bar, toolbar, or tab bar.![Screenshot showing bars with filled backgrounds, which makes the title and buttons in the bars easier to read.](@/assets/guides/ios/troubleshooting/user-interface/transparent-bar-backgrounds/good-fixed-bars.jpg)

If your [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller) is a descendant of a `UINavigationController` with two or more intermediate view controllers, then you can change the appearance properties of the navigation item of the direct child of the `UINavigationController`. This will mean the appearance only applies when this particular view controller is the `topViewController` on the navigation stack:

```swift

navigationItem.scrollEdgeAppearance = navigationItem.standardAppearance
navigationItem.compactScrollEdgeAppearance = navigationItem.compactAppearance

```

Alternatively, you can change the appearance properties of the navigation bar itself. This will apply regardless of which view controller is at the top of the navigation stack:

```swift

navigationController.navigationBar.scrollEdgeAppearance = navigationController.navigationBar.standardAppearance
navigationController.navigationBar.compactScrollEdgeAppearance = navigationController.navigationBar.compactAppearance

```

If your [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller) is a descendant of — but not a direct child of — a `UITabBarController`, then you can change the appearance properties of the tab bar item of the direct child of the `UITabBarController`, so that this appearance only applies when this particular tab is selected:

```swift

tabBarItem.scrollEdgeAppearance = tabBarItem.standardAppearance

```

Alternatively, you can change the appearance properties of the tab bar itself. This will apply regardless of which tab is selected:

```swift

tabBarController.tabBar.scrollEdgeAppearance = tabBarController.tabBar.standardAppearance

```

If you’re using the `UIToolbar` of a `UINavigationController` (a bar shown at the bottom of the screen), then you must change the appearance properties of the toolbar:

```swift

navigationController.toolbar.scrollEdgeAppearance = navigationController.toolbar.standardAppearance
navigationController.toolbar.compactScrollEdgeAppearance = navigationController.toolbar.compactAppearance

```
---

## Related pages

- [Print Button Is Not Showing Up In The Toolbar](/guides/ios/troubleshooting/print-button-is-not-showing-up-in-the-toolbar.md)
- [Split View Controller](/guides/ios/troubleshooting/split-view-controller.md)

