On iPads or other devices with a Regular horizontal size class then the tabs will be shown in a bar along the top of the view, for Compact size classes the tabs will be accessible in the UIToolbar at the bottom of the view.
The openDocumentWithURL: 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.
Tab management
For more control over how tabs are added to the tabbed viewer controller, the addTabWithURL:selected:error: and insertTabWithURL:atIndex:selected:error: methods can be used:
1// Add the fileURL to the end of the tab bar, without changing the selected tab.
The behavior of the tabbed viewer controller can be customized with several properties. The tabsEnabled and 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.
Tab bar visibility
The tab bar's visibility is controlled by the tabBarHidden property. To animate the change in visibility, the setTabBarHidden:animated: method can be used.
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 PTTabbedDocumentViewControllerDelegate protocol's tabbedDocumentViewController:willRemoveTabAtIndex: method.
The tabbedDocumentViewController:willRemoveTabAtIndex: delegate method can be used to close the tabbed viewer controller when the last tab is closed: