PSPDFContainerViewController


@interface PSPDFContainerViewController
    : PSPDFBaseViewController <PSPDFStyleable>

Can embed other view controllers and transition between them.

  • Convenience initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)
    initWithControllers:(nullable NSArray<__kindof UIViewController *> *)controllers
                 titles:(nullable NSArray<NSString *> *)titles;

    Swift

    init(controllers: [UIViewController]?, titles: [String]?)
  • The container controller delegate, notifies when the index changes.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<PSPDFContainerViewControllerDelegate> _Nullable delegate;

    Swift

    @IBOutlet weak var delegate: PSPDFContainerViewControllerDelegate? { get set }
  • Add view controller to the list. - note: Uses the default controller title.

    Declaration

    Objective-C

    - (void)addViewController:(nonnull UIViewController *)controller;

    Swift

    func addViewController(_ controller: UIViewController)
  • Remove view controller from the list.

    Declaration

    Objective-C

    - (void)removeViewController:(nonnull UIViewController *)controller;

    Swift

    func removeViewController(_ controller: UIViewController)
  • All added view controllers.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<__kindof UIViewController *> *_Nonnull viewControllers;

    Swift

    var viewControllers: [UIViewController] { get }
  • The currently visible view controller index.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSUInteger visibleViewControllerIndex;

    Swift

    var visibleViewControllerIndex: UInt { get set }
  • Set the currently visible view controller index.

    Declaration

    Objective-C

    - (void)setVisibleViewControllerIndex:(NSUInteger)visibleViewControllerIndex
                                 animated:(BOOL)animated;

    Swift

    func setVisibleViewControllerIndex(_ visibleViewControllerIndex: UInt, animated: Bool)
  • Set to YES if you want to animate controller changes. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL shouldAnimateChanges;

    Swift

    var shouldAnimateChanges: Bool { get set }
  • Visible view controller title will be stored in NSUserDefaults under this key. Container controller will automaticaly restore the last visible controller when presented. Make sure this is set before view loads.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        NSString *lastVisibleViewControllerTitleKey;

    Swift

    var lastVisibleViewControllerTitleKey: String? { get set }
  • Internally used segment.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) UISegmentedControl *filterSegment;

    Swift

    var filterSegment: UISegmentedControl? { get }