PTTabbedDocumentViewController class is a container view controller that hosts multiple
PTDocumentViewControllers with a tabbed interface. For more information about the
PTDocumentViewController class, please see this guide.
The tabbed viewer control is part of the Tools library, so make sure you have added the Tools library to your project.
The following sample demonstrates how to show a tabbed viewer controller with a document from another
openDocumentWithURL:error: method will create a new tab if the URL is not already being displayed, otherwise it will switch to the existing tab.
The tabbed viewer controller currently relies on the
UINavigationController to supply a navigation bar for the buttons.
The behavior of the tabbed viewer controller can be customized with several properties. The
maximumTabCount properties can be used to disable the tab bar and limit the number of tabs, respectively. By default, tabs are enabled in the tabbed viewer controller and there is no limit on the number of tabs.
When the containing navigation controller's navigation bar is hidden, the tabbed viewer also hides its tab bar.
You can set a delegate to be notified by the tabbed viewer controller when tabs are removed with the
tabbedDocumentViewController:willRemoveTabAtIndex: delegate method can be used to close the tabbed viewer controller when the last tab is closed: