UIViewController

public extension UIViewController
  • A Boolean value indicating whether the popup bar displays the view layout with colors. The default value is false. If necessary, change the value to true before accessing or configuring the popup bar.

    Declaration

    Swift

    @objc
    var enablePopupBarColorsDebug: Bool { get set }
  • A Boolean value indicating whether the floating popup bar uses smooth gradient. The default value is true. If necessary, change the value to false before accessing or configuring the popup bar.

    See also

    smooth-gradient.

    Declaration

    Swift

    @objc
    var usePopupBarSmoothGradient: Bool { get set }
  • A Boolean value indicating whether the floating popup bar uses legacy shadow (otherwise it uses NSShadow with shadowPath). The default value is false. If necessary, change the value to true before accessing or configuring the popup bar.

    Declaration

    Swift

    @objc
    var usePopupBarLegacyShadow: Bool { get set }
  • The popup bar managed by the system. (read-only).

    See also

    PBPopupBar.

    Declaration

    Swift

    @objc
    internal(set) weak var popupBar: PBPopupBar! { get set }
  • Returns a view to attach the popup bar to.

    A default implementation is provided for UIViewController, UINavigationController and UITabBarController. The default implmentation for UIViewController returns an invisible UIView instance, docked to the bottom of the screen. For UINavigationController, the toolbar is returned. For UITabBarController, the tab bar is returned.

    Declaration

    Swift

    @objc
    internal(set) weak var bottomBar: UIView! { get set }
  • Declaration

    Swift

    @objc
    internal(set) weak var popupController: PBPopupController! { get set }
  • Returns the container (presenting) view controller for the popup bar, and for the presented view controller (popupContentViewController). May be UIViewController, UINavigationController, UITabBarController or a custom container view controller. (read-only).

    Declaration

    Swift

    @objc
    internal(set) weak var popupContainerViewController: UIViewController! { get set }
  • Returns the popup content view controller of the container. If there is no popup bar presentation, the property will be nil. (read-only).

    Declaration

    Swift

    @objc
    internal(set) weak var popupContentViewController: UIViewController! { get set }
  • Returns the view where is embedded the popupContentViewController’s view for presentation. This view has a optional close button and a visual effect view with an optional effect. (read-only).

    See also

    PBPopupContentView.

    Declaration

    Swift

    @objc
    internal(set) weak var popupContentView: PBPopupContentView! { get set }
  • A Boolean value indicating whether the popup bar is hidden when the view controller is pushed on to a navigation controller.

    See also

    hidesBottomBarWhenPushed.

    Declaration

    Swift

    @objc
    var hidesPopupBarWhenPushed: Bool { get set }
  • Custom insets that you specify to modify the container view controller’s safe area (usefull for a custom container). Use this property to adjust the safe area bottom edge inset value of this view controller’s views by the specified amount.

    Declaration

    Swift

    @objc
    var additionalSafeAreaInsetsBottomForContainer: CGFloat { get set }
  • Presents an interactive popup bar in the container’s view hierarchy and optionally opens the popup in the same animation. The popup bar is attached to the container’s bottom bar (see popupContainerViewController).

    You may call this method multiple times with different controllers, triggering replacement to the popup content view and update to the popup bar, if popup is open or bar presented, respectively.

    The provided controller is retained by the system and will be released once a different controller is presented or when the popup bar is dismissed.

    Declaration

    Swift

    @objc
    func presentPopupBar(withPopupContentViewController controller: UIViewController!, openPopup: Bool, animated: Bool, completion: (() -> Swift.Void)? = nil)

    Parameters

    controller

    The presented view controller for popup presentation.

    openPopup

    Pass true to open the popup in the same animation; otherwise, pass false.

    animated

    Pass true to animate the presentation; otherwise, pass false.

    completion

    The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

  • Presents an interactive popup bar in the container’s view hierarchy. The popup bar is attached to the container’s bottom bar (see popupContainerViewController).

    You may call this method multiple times with different controllers, triggering replacement to the popup content view and update to the popup bar, if popup is open or bar presented, respectively.

    The provided controller is retained by the system and will be released once a different controller is presented or when the popup bar is dismissed.

    Declaration

    Swift

    @objc
    func presentPopupBar(withPopupContentViewController controller: UIViewController!, animated: Bool, completion: (() -> Swift.Void)? = nil)

    Parameters

    controller

    The presented view controller for popup presentation.

    animated

    Pass true to animate the presentation; otherwise, pass false.

    completion

    The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

  • Dismisses the popup presentation, closing the popup if open and dismissing the popup bar.

    • animated: Pass true to animate the presentation; otherwise, pass false.
    • completion: The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

    Declaration

    Swift

    @objc
    func dismissPopupBar(animated: Bool, completion: (() -> Swift.Void)? = nil)
  • Hide the popup bar.

    • animated: Pass true to animate the presentation; otherwise, pass false.
    • completion: The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

    Declaration

    Swift

    @objc
    func hidePopupBar(animated: Bool, completion: (() -> Swift.Void)? = nil)
  • Show the popup bar.

    • animated: Pass true to animate the presentation; otherwise, pass false.
    • completion: The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

    Declaration

    Swift

    @objc
    func showPopupBar(animated: Bool, completion: (() -> Swift.Void)? = nil)
  • Presents an interactive popup view controller in the container’s view hierarchy. The popup bar is not visible and the popup is attached or not to the container’s bottom bar (see popupContainerViewController) depending on the isFloating parameter.

    You may call this method multiple times with different controllers, triggering replacement to the popup content view and update to the popup bar, if popup is open or bar presented, respectively.

    The provided controller is retained by the system and will be released once a different controller is presented or when the popup bar is dismissed.

    Declaration

    Swift

    @objc
    func presentPopup(withPopupContentViewController controller: UIViewController!, size: CGSize = .zero, isFloating: Bool = true, animated: Bool, completion: (() -> Swift.Void)? = nil)

    Parameters

    controller

    The presented view controller for popup presentation.

    size

    The popup content view size (optional). May be set by the controller in viewDidLayoutSubviews.

    isFloating

    A Boolean value that indicates whether the popup is floating (true) or not (false).

    animated

    Pass true to animate the presentation; otherwise, pass false.

    completion

    The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

  • Dismisses the popup presentation, closing the popup if open.

    • animated: Pass true to animate the presentation; otherwise, pass false.
    • completion: The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

    Declaration

    Swift

    @objc
    func dismissPopup(animated: Bool, completion: (() -> Swift.Void)? = nil)
  • Opens the popup, displaying the content view controller’s view.

    • animated: Pass true to animate the presentation; otherwise, pass false.
    • completion: The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

    Declaration

    Swift

    @objc
    func openPopup(animated: Bool, completion: (() -> Swift.Void)? = nil)
  • Closes the popup, hiding the content view controller’s view.

    • animated: Pass true to animate the presentation; otherwise, pass false.
    • completion: The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.

    Declaration

    Swift

    @objc
    func closePopup(animated: Bool, completion: (() -> Swift.Void)? = nil)
  • Call this method to update the popup bar appearance (style, tint color, etc.) according to its docking view. You should call this after updating the docking view. If the popup bar’s inheritsVisualStyleFromBottomBar property is set to false, this method has no effect.

    Declaration

    Swift

    @objc
    func updatePopupBarAppearance()
  • Undocumented

    Declaration

    Swift

    func popupContainerViewController(for viewController: UIViewController? = nil) -> UIViewController?