PopMenuManager
final public class PopMenuManager : NSObject
The object responsible for managing a pop menu PopMenuViewController
-
Default manager singleton.
Declaration
Swift
public static let `default`: PopMenuManager
-
Reference to the pop menu delegate instance.
Declaration
Swift
public weak var popMenuDelegate: PopMenuViewControllerDelegate? { get set }
-
Determines whether to dismiss menu after an action is selected.
Declaration
Swift
public var popMenuShouldDismissOnSelection: Bool
-
The dismissal handler for pop menu.
Declaration
Swift
public var popMenuDidDismiss: ((Bool) -> Void)?
-
Determines whether to use haptics for menu selection.
Declaration
Swift
public var popMenuShouldEnableHaptics: Bool
-
Appearance for passing on to pop menu.
Declaration
Swift
public let popMenuAppearance: PopMenuAppearance
-
Every action item about to be displayed.
Declaration
Swift
public var actions: [PopMenuAction]
-
Initializer with appearance.
Declaration
Swift
public init(appearance: PopMenuAppearance = PopMenuAppearance())
-
Pass a new action to pop menu.
Declaration
Swift
public func addAction(_ action: PopMenuAction)
-
Present the pop menu.
Declaration
Swift
public func present(sourceView: AnyObject? = nil, on viewController: UIViewController? = nil, animated: Bool = true, completion: (() -> Void)? = nil)
Parameters
sourceView
From which view and where exactly on the screen to be shown (default: show in the center)
above
Present above which controller (default: use the top view controller)
animated
Animate the presentation
completion
Completion handler