---
title: "Customizing list of annotations in iOS PDF viewer | Nutrient"
canonical_url: "https://www.nutrient.io/guides/ios/customizing-the-interface/customizing-the-annotation-table-view-controller/"
md_url: "https://www.nutrient.io/guides/ios/customizing-the-interface/customizing-the-annotation-table-view-controller.md"
last_updated: "2026-05-26T01:23:09.677Z"
description: "Nutrient lets you customize the annotation list. Here are the two approaches to customizing settings in the AnnotationTableViewController: for Nutrient iOS SDK."
---

# Customizing lists of annotations on iOS

Nutrient enables you to customize the annotation list. Here are the two approaches to customizing settings in the [`AnnotationTableViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/annotationtableviewcontroller):

1. Subclass the view controller, and then register your subclass, [`overrideClass(_:with:)`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfigurationbuilder/overrideclass(_:with:)), in the [`PDFConfigurationBuilder`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfigurationbuilder). Configure any properties in the `init` method of the subclass.

2. Use the `pdfViewController(_:shouldShow:options:animated:)` delegate.

This is a more advanced customization because the annotation controller is packed inside a container view controller unless all other view controller options are disabled in the outline bar button:

### SWIFT

```swift

static func PSCContainedControllerOfClass<U: UIViewController, T>(container controller: U, klass: T.Type) -> T? {
    if let vc = controller as? T {
        return vc
    } else if let topVC = (controller as? UINavigationController)?.topViewController {
        return PSCContainedControllerOfClass(container: topVC, klass: klass)
    } else if let containerVC = controller as? ContainerViewController {
        for viewController in containerVC.viewControllers {
            if let containedVC = PSCContainedControllerOfClass(container: viewController, klass: klass) {
                return containedVC
            }
        }
    }
    return nil
}

func pdfViewController(_ pdfController: PDFViewController, shouldShow controller: UIViewController, options: [String : Any]? = nil, animated: Bool) -> Bool {
    let annotationController = PSCContainedControllerOfClass(container: controller, klass: AnnotationTableViewController.self)
    annotationController?.showDeleteAllOption = false

    // Only show ink, highlight, and stamp annotations in the annotation list.
    annotationController?.visibleAnnotationTypes = [.ink,.highlight,.stamp]

    return true
}

```

### OBJECTIVE-C

```objc

static id PSCControllerForClass(id theController, Class klass) {
    if ([theController isKindOfClass:klass]) {
        return theController;
    }else if ([theController isKindOfClass:UINavigationController.class]) {
        return PSCControllerForClass(((UINavigationController *)theController).topViewController, klass);
    }else if ([theController isKindOfClass:PSPDFContainerViewController.class]) {
        for (UIViewController *contained in ((PSPDFContainerViewController *)theController).viewControllers) {
            if (PSCControllerForClass(contained, klass)) return PSCControllerForClass(contained, klass);
        }
    }
    return nil;
}

- (BOOL)pdfViewController:(PSPDFViewController *)pdfController shouldShowController:(UIViewController *)controller options:(nullable NSDictionary<NSString *, id> *)options animated:(BOOL)animated {
    PSCLog(@"shouldShowViewController: %@ animated: %d.", controller, animated);

    PSPDFAnnotationTableViewController *annotCtrl = PSCControllerForClass(controller, PSPDFAnnotationTableViewController.class);
    annotCtrl.showDeleteAllOption = NO;

    // Only show ink, highlight, and stamp annotations in the annotation list.
    annotCtrl.visibleAnnotationTypes = [NSSet<PSPDFAnnotationString> setWithArray:@[PSPDFAnnotationStringInk, PSPDFAnnotationStringHighlight, PSPDFAnnotationStringStamp]];

    return YES;
}

```
---

## Related pages

- [Customizing annotation color pickers on iOS](/guides/ios/customizing-the-interface/customizing-color-pickers.md)
- [Customize the annotation inspector on iOS](/guides/ios/annotations/annotation-inspector.md)
- [Customizing the annotation toolbar on iOS](/guides/ios/customizing-the-interface/customizing-the-annotation-toolbar.md)

