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
niland no preview is displayed.Declaration
Swift
@objc optional func previewingViewControllerFor(_ popupBar: PBPopupBar) -> UIViewController?Parameters
popupBarThe popup bar object.
Return Value
The view controller whose view you want to provide as the preview (peek), or
nilto 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
popupBarThe popup bar object.
viewControllerToCommitThe view controller to commit.
View on GitHub