PSPDFFlexibleToolbarController

Undocumented

  • Undocumented

  • Undocumented

  • Initialize with toolbar. Required.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithToolbar:(nonnull PSPDFFlexibleToolbar *)toolbar;

    Swift

    init(toolbar: PSPDFFlexibleToolbar)
  • Displayed toolbar.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFFlexibleToolbar *_Nonnull toolbar;

    Swift

    var toolbar: PSPDFFlexibleToolbar { get }
  • The flexible toolbar container. Set to nil when the toolbar is not visible.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable)
        PSPDFFlexibleToolbarContainer *flexibleToolbarContainer;

    Swift

    var flexibleToolbarContainer: PSPDFFlexibleToolbarContainer? { get }
  • Returns YES whenever the toolbar is visible. If the toolbar is currently animating out, this will be already set to NO.

    Declaration

    Objective-C

    @property (readonly, getter=isToolbarVisible, nonatomic) BOOL toolbarVisible;

    Swift

    var isToolbarVisible: Bool { get }
  • Shows or hides the toolbar (animated).

    Declaration

    Objective-C

    - (void)toggleToolbarAnimated:(BOOL)animated;

    Swift

    func toggleToolbar(animated: Bool)
  • Show the toolbar, if not currently visible. - returns: Whether the toolbar was actually shown. - note: Configure the hostView before first showing the toolbar.

    Declaration

    Objective-C

    - (BOOL)showToolbarAnimated:(BOOL)animated;

    Swift

    func showToolbar(animated: Bool) -> Bool

    Return Value

    Whether the toolbar was actually shown.

  • Hide the toolbar, if currently shown. - returns: Whether the toolbar was actually hidden.

    Declaration

    Objective-C

    - (BOOL)hideToolbarAnimated:(BOOL)animated;

    Swift

    func hideToolbar(animated: Bool) -> Bool

    Return Value

    Whether the toolbar was actually hidden.

  • Configures the hostView, hostToolbar and hostViewController for your setup. @property hostView Can be nil unless it’s an unusual setup. When nil, viewController or container are used to determine an appropriate host view. @property container Might be a UIBarButtonItem or a UIView class that sits on the hostToolbar. If nil, the parent bar will be inferred from the viewController. @property viewController A hook will be installed, if non-nil, to auto-hide the toolbar as the controller disappears.

    Declaration

    Objective-C

    - (void)updateHostView:(nullable UIView *)hostView
                 container:(nullable id)container
            viewController:(nullable UIViewController *)viewController;

    Swift

    func updateHostView(_ hostView: Any!, container: Any?, viewController: Any!)
  • The host view for the PSPDFFlexibleToolbarContainer. - see: updateHostView:container:viewController:

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) UIView *hostView;

    Swift

    var hostView: NSView? { get }
  • The UIToolbar / UINavigationBar that is used to anchor the toolbar. - see: updateHostView:container:viewController:

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) UIView<PSPDFSystemBar> *hostToolbar;
  • The view controller that is presenting the toolbar. - see: updateHostView:container:viewController:

    Declaration

    Objective-C

    @property (readonly, nonatomic) UIViewController *_Nullable hostViewController;

    Swift

    weak var hostViewController: NSViewController? { get }