PBPopupBarPreviewingDelegate
@objc
public protocol PBPopupBarPreviewingDelegate : NSObjectProtocol
A set of methods used by the delegate to respond, with a preview view controller and a commit view controller, to the user pressing the popup bar object on the screen of a device that supports 3D Touch.
-
Called when the user performs a peek action on the popup bar.
The default implementation returns
nil
and no preview is displayed.Declaration
Swift
@objc optional func previewingViewControllerFor(_ popupBar: PBPopupBar) -> UIViewController?
Parameters
popupBar
The popup bar object.
Return Value
The view controller whose view you want to provide as the preview (peek), or
nil
to disable preview. -
Called when the user performs a pop action on the popup bar.
The default implementation does not commit the view controller.
Declaration
Swift
@objc optional func popupBar(_ popupBar: PBPopupBar, commit viewControllerToCommit: UIViewController)
Parameters
popupBar
The popup bar object.
viewControllerToCommit
The view controller to commit.