Controllers
-
A subclass of
UIActivityViewController
that postsPDFAnalytics.EventName.share
on completion.Declaration
Objective-C
@interface PSPDFActivityViewController : UIActivityViewController <PSPDFOverridable>
Swift
class ActivityViewController : UIActivityViewController, Overridable
-
Shows a grid of annotations.
This is the superclass of
See morePSPDFStampViewController
andPSPDFSavedAnnotationsViewController
and is not intended to be used directly.Declaration
Objective-C
@interface PSPDFAnnotationGridViewController : PSPDFBaseViewController <PSPDFStyleable>
Swift
class AnnotationGridViewController : PDFBaseViewController, Styleable
-
An inspector that allows users to view and change the properties of annotations.
Note
The inspector currently only supports setting one annotation, but since long-term we want multi-select-change, the API has already been prepared for.Declaration
Objective-C
@interface PSPDFAnnotationStyleViewController : PSPDFStaticTableViewController <PSPDFFontPickerViewControllerDelegate, PSPDFStyleable, PSPDFOverridable>
Swift
class AnnotationStyleViewController : PDFStaticTableViewController, FontPickerViewControllerDelegate, Styleable, Overridable
-
Shows an overview of all annotations in the current document.
Note
The toolbar/navigation items are populated inviewWillAppear:
and can be changed in your subclass.Declaration
Objective-C
@interface PSPDFAnnotationTableViewController : PSPDFSearchableTableViewController <PSPDFDocumentInfoController, PSPDFSegmentImageProviding, PSPDFStyleable, PSPDFOverridable>
Swift
class AnnotationTableViewController : SearchableTableViewController, DocumentInfoController, SegmentImageProviding, Styleable, Overridable
-
Abstract class for a controller that manages a table view. Adds support for hardware keyboard navigation, and automatically sizing popovers to fit the table view contents.
See moreDeclaration
Objective-C
@interface PSPDFBaseTableViewController : UITableViewController
Swift
class BaseTableViewController : UITableViewController
-
Undocumented
See moreDeclaration
Objective-C
@interface PSPDFBaseViewController : UIViewController @end
Swift
class PDFBaseViewController : UIViewController
-
Controller to change the brightness and some related appearance options. In addition to mimicking the system brightness options it also supports additional software dimming and social appearance modes.
Note
Best presented as popover, configures themodalPresentationStyle
accordingly at init time.Declaration
Objective-C
@interface PSPDFBrightnessViewController : PSPDFStaticTableViewController <PSPDFOverridable>
Swift
class BrightnessViewController : PDFStaticTableViewController, Overridable
-
Similar to
See moreUITabBarController
but using a segmented control at the top to switch between child view controllers.Declaration
Objective-C
@interface PSPDFContainerViewController : PSPDFBaseViewController <PSPDFStyleable, PSPDFOverridable>
Swift
class ContainerViewController : PDFBaseViewController, Styleable, Overridable
-
Displays an interface that allows the user to pick a set of options that determine how a set of PDF files should be processed before being shared to a destination. By default, the user can choose the file type, the page range, and how annotations should be handled.
Documents can be shared to different Destinations specified by the
PSPDFDocumentSharingDestination
enumeration. By default, thePDFDocumentSharingViewController
will share toPSPDFDocumentSharingDestinationActivity
, which will let the user pick the ultimate action for the generated documents via aUIActivityViewController
instance (which can be customized via the-activityViewControllerForSharingItems:sender:
method.).A single
PDFDocumentSharingViewController
instance can offer multiple destinations to share the documents to to the user — they will be represented on a segmented control on the navigation bar of the sharing view controller. However, a Share can only be performed to a single destination at a time. To add Destinations to the list the user can choose from, create aPSPDFDocumentSharingConfiguration
object and set the appropriate value on its builder’sdestination
property, then add that configuration to thesharingConfigurations
property on the sharing view controller.Please note that Destinations are exclusive per sharing view controller instance, so you can’t have 2 or more configurations with the same destination set.
Once the instance has been configured appropriately, call
See more-presentFromViewController:sender:
on it to present the UI.Declaration
Objective-C
@interface PSPDFDocumentSharingViewController : PSPDFBaseViewController <PSPDFStyleable, PSPDFOverridable>
Swift
class PDFDocumentSharingViewController : PDFBaseViewController, Styleable, Overridable
-
A
See morePSPDFDocumentSharingConfiguration
instance configures how the sharing view controller behaves, and what options it lets the user customize.Declaration
Objective-C
@interface PSPDFDocumentSharingConfiguration : PSPDFBaseConfiguration <PSPDFDocumentSharingConfigurationBuilder *>
Swift
class DocumentSharingConfiguration : BaseConfiguration<DocumentSharingConfigurationBuilder>
-
Font picker that allows the user to select a font and customize the style.
See moreDeclaration
Objective-C
@interface PSPDFFontPickerViewController : PSPDFPickerTableViewController <PSPDFOverridable>
Swift
class FontPickerViewController : PickerTableViewController, Overridable
-
Subclass of
UIImagePickerController
used in PSPDFKit when showing the image picker, like when adding an image annotation or when adding a new page to a document from an image.Allows subclassing the image picker controller, for example if you need to block portrait: https://stackoverflow.com/questions/11467361/taking-a-photo-in-an-ios-landscape-only-app
Shows a custom image editor after an image has been selected if
shouldShowImageEditor
is enabled.When used in an app extension, a scaled down version of the image is used to avoid exceeding the 120 MB limit of app extensions.
@note
See moredelegate
is set toself
. Don’t change this, as this will restrict presenting the image editor.imageDelegate
will be set when the picker is called from within PSPDFKit logic. You can override the delegate as long as you correctly forward calls to the original target.Declaration
Objective-C
@interface PSPDFImagePickerController : UIImagePickerController <PSPDFOverridable>
Swift
class ImagePickerController : UIImagePickerController, Overridable
-
Document Info View Controller.
Present and allows to edit the most common PDF Document properties (metadata). Changes are applied to the document automatically.
See moreDeclaration
Objective-C
@interface PSPDFDocumentInfoViewController : PSPDFStaticTableViewController <PSPDFDocumentInfoController, PSPDFSegmentImageProviding, PSPDFStyleable, PSPDFOverridable>
Swift
class PDFDocumentInfoViewController : PDFStaticTableViewController, DocumentInfoController, SegmentImageProviding, Styleable, Overridable
-
Document Security and Permissions View Controller.
Present and allows to edit the PDF Document permissions and passwords.
See moreDeclaration
Objective-C
@interface PSPDFDocumentSecurityViewController : PSPDFStaticTableViewController <PSPDFDocumentInfoController, PSPDFStyleable, PSPDFOverridable>
Swift
class PDFDocumentSecurityViewController : PDFStaticTableViewController, DocumentInfoController, Styleable, Overridable
-
Allows displaying multiple
See morePSPDFDocuments
.Declaration
Objective-C
@interface PSPDFMultiDocumentViewController : PSPDFBaseViewController <PSPDFConflictResolutionManagerDelegate>
Swift
class MultiDocumentViewController : PDFBaseViewController, ConflictResolutionManagerDelegate
-
A navigation controller that is optimized for use with
PDFViewController
. We recommend using this subclass if possible.This subclass forwards the following rotation methods to the top view controller:
shouldAutorotate
,supportedInterfaceOrientations
,preferredInterfaceOrientationForPresentation:
.To improve legibility with the widest range of documents, this subclass changes the default bar background to use a system thick material effect for the navigation bar’s
See morestandardAppearance
andcompactAppearance
. ThescrollEdgeAppearance
andcompactScrollEdgeAppearance
are not changed.Declaration
Objective-C
@interface PSPDFNavigationController : UINavigationController <UINavigationControllerDelegate>
Swift
class PDFNavigationController : UINavigationController, UINavigationControllerDelegate
-
A view controller to view and edit the comments attached to an annotation.
Comments means the
contents
of the annotation and, if enabled, thecontents
of all replies to that annotation. Whether replies and reviews are enabled is determined by thecanShowAnnotationReplies
andcanShowAnnotationReviews
features fromPSPDFDocumentFeatures
respectively.This can be used for any type of annotation. For
See morePSPDFNoteAnnotation
, additional options are displayed for setting the note’s color and icon.Declaration
Objective-C
@interface PSPDFNoteAnnotationViewController : PSPDFBaseViewController <UITextViewDelegate, PSPDFStyleable, PSPDFOverridable>
Swift
class NoteAnnotationViewController : PDFBaseViewController, UITextViewDelegate, Styleable, Overridable
-
The list controller can check models to build a selectable list.
Declaration
Objective-C
@interface PSPDFPickerTableViewController : PSPDFStaticTableViewController <PSPDFOverridable>
Swift
class PickerTableViewController : PDFStaticTableViewController, Overridable
-
A view controller that shows Reader View, which reformats document text into an easy-to-read, single-column view that’s optimized for mobile devices.
Reader View is typically shown using the
readerViewButtonItem
of aPDFViewController
, but it may also be created and presented programatically.This class does not support being created from a Storyboard or Interface Builder archive.
This requires the Reader View component to be enabled for your license.
See https://pspdfkit.com/guides/ios/features/reader-view/ for further documentation.
See moreDeclaration
Objective-C
@interface PSPDFReaderViewController : PSPDFBaseViewController
Swift
class ReaderViewController : PDFBaseViewController
-
A view controller that shows a grid of saved annotation sets. It allows to save and load saved annotations.
See moreDeclaration
Objective-C
@interface PSPDFSavedAnnotationsViewController : PSPDFAnnotationGridViewController < PSPDFAnnotationGridViewControllerDataSource, PSPDFStyleable, PSPDFOverridable>
Swift
class SavedAnnotationsViewController : AnnotationGridViewController, AnnotationGridViewControllerDataSource, Styleable, Overridable
-
The screen controller will automatically watch for connected screens and external scenes if the property
pdfControllerToMirror
is set, and will release such mirrors once this property has been set to nil.UIWindow
objects are automatically created for each connected screen, and destroyed once a screen is disconnected orpdfControllerToMirror
is set to nil.Note
Use this class from the main thread only.Declaration
Objective-C
@interface PSPDFScreenController : NSObject
Swift
class ScreenController : NSObject
-
Controller to change some key UX settings.
Configurable via
PDFConfiguration.settingsOptions
property. UsePDFViewController.settingsButtonItem
to add it to controller’s navigation item.To be notified about configuration changes, use KVO on the
See moreconfiguration
property of thePDFViewController
.Declaration
Objective-C
@interface PSPDFSettingsViewController : PSPDFStaticTableViewController <PSPDFOverridable>
Swift
class PDFSettingsViewController : PDFStaticTableViewController, Overridable
-
Shows a list of signatures from the set
See moresignatureStore
.Declaration
Objective-C
@interface PSPDFSignatureSelectorViewController : PSPDFStatefulTableViewController <PSPDFStyleable, PSPDFOverridable>
Swift
class SignatureSelectorViewController : StatefulTableViewController, Styleable, Overridable
-
The signature view controller can be used to create ink signatures to add to a document.
These signatures optionally can be used to create a digital signature with a certificate.
This class constitutes PSPDFKit’s older signatures functionality from before the introduction of Electronic Signatures. As such, using this class requires that your license includes the Annotations feature and was originally purchased in April 2021 or earlier. If you purchased your license after this time, then you should use
SignatureCreationViewController
from Electronic Signatures instead.This older signatures functionality will continue to be maintained and supported. However, we recommend using Electronic Signatures for new PSPDFKit integrations. If you’re interested in upgrading, please see our migration guide: https://pspdfkit.com/guides/ios/migration-guides/migrating-to-electronic-signatures/
See moreDeclaration
Objective-C
@interface PSPDFSignatureViewController : PSPDFBaseViewController <PSPDFStyleable, PSPDFOverridable>
Swift
class SignatureViewController : PDFBaseViewController, Styleable, Overridable
-
Allows adding signatures or drawings as ink annotations.
See moreDeclaration
Objective-C
@interface PSPDFStampViewController : PSPDFAnnotationGridViewController < PSPDFAnnotationGridViewControllerDataSource, PSPDFTextStampViewControllerDelegate, PSPDFOverridable>
Swift
class StampViewController : AnnotationGridViewController, AnnotationGridViewControllerDataSource, TextStampViewControllerDelegate, Overridable
-
An abstract class for a controller that manages a table view or shows a label when there is no content for the table view.
See moreDeclaration
Objective-C
@interface PSPDFStatefulTableViewController : PSPDFBaseTableViewController <PSPDFStatefulViewControlling>
Swift
class StatefulTableViewController : BaseTableViewController, StatefulViewControlling
-
Shows a message when the controller is empty.
See moreDeclaration
Objective-C
@protocol PSPDFStatefulViewControlling <UIContentContainer>
Swift
protocol StatefulViewControlling : UIContentContainer
-
Helps to create controllers that show static table view content.
Declaration
Objective-C
@interface PSPDFStaticTableViewController : PSPDFBaseTableViewController
Swift
class PDFStaticTableViewController : BaseTableViewController
-
A view controller that lets users create or edit a custom text annotation stamp.
See moreDeclaration
Objective-C
@interface PSPDFTextStampViewController : PSPDFStaticTableViewController <PSPDFOverridable>
Swift
class TextStampViewController : PDFStaticTableViewController, Overridable
-
This is the main view controller to display PDF documents.
This view controller can be used modally or embedded in another view controller.
Note
When adding as a child view controller, ensure view controller containment is set up correctly. If you override this class, ensure allUIViewController
methods you’re using do call super. https://pspdfkit.com/guides/ios/customizing-the-interface/embedding-the-pspdfviewcontroller-inside-a-custom-container-view-controller/For subclassing, use
overrideClass:withClass:
to register your custom subclasses. https://pspdfkit.com/guides/ios/getting-started/overriding-classes/The best time for setting properties is during initialization in
commonInitWithDocument:configuration:
. Some properties require a call toreloadData
if they are changed after the controller has been displayed. Do not set properties during a rotation phase or view appearance (e.g. useviewDidAppear:
instead ofviewWillAppear:
) since that could corrupt internal state, instead useupdateSettingsForBoundsChangeBlock
.To provide a more immersive viewing experience,
See morePDFViewController
shows content underneath the navigation bar and allows the user to tap to hide this bar. Therefore, using bars with transparent backgrounds is not supported.PDFViewController
will automatically handle disabling transparent bar backgrounds when its a direct child of aUINavigationController
or aUITabBarController
. For other view controller hierarchies, you should disable transparent bar backgrounds by setting thescrollEdgeAppearance
to be the same as thestandardAppearance
on the navigation bar, toolbar, or tab bar.Declaration
Objective-C
@interface PSPDFViewController : PSPDFBaseViewController < MFMailComposeViewControllerDelegate, MFMessageComposeViewControllerDelegate, PSPDFAnnotationTableViewControllerDelegate, PSPDFBackForwardActionListDelegate, PSPDFBookmarkViewControllerDelegate, PSPDFConflictResolutionManagerDelegate, PSPDFControlDelegate, PSPDFDocumentSharingViewControllerDelegate, PSPDFErrorHandler, PSPDFExternalURLHandler, PSPDFFlexibleToolbarContainerDelegate, PSPDFInlineSearchManagerDelegate, PSPDFOutlineViewControllerDelegate, PSPDFOverridable, PSPDFPresentationContext, PSPDFSearchViewControllerDelegate, PSPDFTextSearchDelegate, PSPDFWebViewControllerDelegate>
Swift
class PDFViewController : PDFBaseViewController, MFMailComposeViewControllerDelegate, MFMessageComposeViewControllerDelegate, AnnotationTableViewControllerDelegate, BackForwardActionListDelegate, BookmarkViewControllerDelegate, ConflictResolutionManagerDelegate, ControlDelegate, PDFDocumentSharingViewControllerDelegate, ErrorHandler, ExternalURLHandler, FlexibleToolbarContainerDelegate, InlineSearchManagerDelegate, OutlineViewControllerDelegate, Overridable, PresentationContext, SearchViewControllerDelegate, TextSearchDelegate, WebViewControllerDelegate
-
Implement this delegate in your
See moreUIViewController
to get notified ofPDFViewController
events.Declaration
Objective-C
@protocol PSPDFViewControllerDelegate <NSObject>
Swift
protocol PDFViewControllerDelegate : NSObjectProtocol
-
Inline Web Browser.
See moreDeclaration
Objective-C
@interface PSPDFWebViewController : PSPDFBaseViewController <PSPDFStyleable, PSPDFOverridable>
Swift
class WebViewController : PDFBaseViewController, Styleable, Overridable