Toolbar
@available(iOS 9.0, *)
@IBDesignable
@objcMembers
@objc(PESDKToolbar)
open class Toolbar : UIView
A Toolbar
is used inside a ToolbarController
to display ToolbarItem
s.
-
The content view which hosts all
ToolbarItem
s.Declaration
Swift
open private(set) lazy var contentView: UIView = { let view = UIView() view.preservesSuperviewLayoutMargins = true view.backgroundColor = .clear view.translatesAutoresizingMaskIntoConstraints = false return view }()
-
The toolbar items that are on the toolbar item stack.
Declaration
Swift
public var items: [ToolbarItem] { get set }
-
Updates the items that are on the toolbar item stack.
Declaration
Swift
public func setItems(_ items: [ToolbarItem]?, animated: Bool)
Parameters
items
The items to replace the toolbar item stack with.
animated
Whether or not to animate the change.
-
Pushes a toolbar item onto the toolbar item stack.
Declaration
Swift
@objc(pushToolbarItem:animated:) public func push(_ item: ToolbarItem, animated: Bool)
Parameters
item
The item to push onto the stack.
animated
Whether or not to animate the change.
-
Pops the top toolbar item from the toolbar item stack.
Declaration
Swift
@discardableResult @objc(popToolbarItemAnimated:) public func pop(animated: Bool) -> ToolbarItem?
Parameters
animated
Whether or not to animate the change.
Return Value
The toolbar item that was popped from the stack, if any.