---
title: "Configure PDF view controller on iOS | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/ios/getting-started/view-controller-configuration/"
md_url: "https://www.nutrient.io/guides/ios/getting-started/view-controller-configuration.md"
last_updated: "2026-06-09T10:25:14.484Z"
description: "Learn to configure the PDF view controller on iOS using Nutrient iOS SDK. Create custom settings for document display with Swift and Objective-C examples."
---

# Configure PDF view controllers on iOS

A [`PDFConfiguration`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfiguration) defines the behavior of a [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller). It uses the builder pattern from [`PDFConfigurationBuilder`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfigurationbuilder) to create an immutable copy using a closure.

The following code demonstrates a typical use case:

### SWIFT

```swift

let document = Document(url: documentURL)
// The configuration building closure is passed to the `Document` initializer as a trailing closure.
let controller = PDFViewController(document: document) {
    $0.thumbnailBarMode =.none
    $0.shouldShowUserInterfaceOnViewWillAppear = false
    $0.isPageLabelEnabled = false
}

```

### OBJECTIVE-C

```objc

PSPDFDocument *document = [[PSPDFDocument alloc] initWithURL:documentURL];
PSPDFViewController *controller = [[PSPDFViewController alloc] initWithDocument:document configuration:[PSPDFConfiguration configurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
    builder.thumbnailBarMode = PSPDFThumbnailBarModeNone;
    builder.shouldShowUserInterfaceOnViewWillAppear = NO;
    builder.pageLabelEnabled = NO;
}]];

```

[`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller) contains a shortcut to create and set a new [`PDFConfiguration`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfiguration) object — [`updateConfiguration(builder:)`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller/updateconfiguration(builder:)) — based on the current settings. After setting the new configuration object, the view controller will automatically invoke [`reloadData()`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller/reloaddata()) to refresh its state.

Certain properties can be updated without a full state reload using [`updateConfigurationWithoutReloading(builder:)`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller/updateconfigurationwithoutreloading(builder:)). Be careful though, since Nutrient doesn’t warn you if you change a property that would require a state reload, as the view controller could get into an invalid state using this method.

Here’s an example:

### SWIFT

```swift

controller.updateConfigurationWithoutReloading {
    $0.isTextSelectionEnabled =!isAutoplaying
    $0.isScrollOnEdgeTapEnabled =!isAutoplaying
}

```

### OBJECTIVE-C

```objc

[controller updateConfigurationWithoutReloadingWithBuilder:^(PSPDFConfigurationBuilder *builder) {
    builder.textSelectionEnabled =!self.isAutoplaying;
    builder.scrollOnEdgeTapEnabled =!self.isAutoplaying;
}];

```
---

## Related pages

- [Customize PDF view controller states on iOS](/guides/ios/customizing-the-interface/state-customization.md)
- [Embedding PDF view controllers on iOS](/guides/ios/customizing-the-interface/embedding-the-pdfviewcontroller-inside-a-custom-container-view-controller.md)
- [Customize the display of PDFs with the view hierarchy](/guides/ios/customizing-the-interface/the-document-view-hierarchy.md)

