MenuViewController

@available(iOS 9.0, *)
open class MenuViewController<MenuDataSource, CellConfigurator> : ViewController, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, TransitionProviding where MenuDataSource : MenuDataSourceProtocol, CellConfigurator : CellConfiguratorProtocol, MenuDataSource.Item == CellConfigurator.Item

A MenuViewController displays a menu at the bottom of its view and the view of an arbitrary contained UIViewController above that menu.

  • The view controller whose view should be displayed above the menu.

    Declaration

    Swift

    open let contentViewController: UIViewController
  • The MenuDataSourceProvider that provides the data source for the menu (an instance of UICollectionView).

    Declaration

    Swift

    open let menuDataSourceProvider: MenuDataSourceProvider<MenuDataSource, CellConfigurator>
  • When selecting an item in the menu, the item can either remain selected until manually deselected (true) or be immediately deselected automatically (false). The default is false.

    Declaration

    Swift

    open var keepsSelection: Bool
  • An object that acts as the delegate.

    Declaration

    Swift

    open weak var delegate: MenuViewControllerDelegate?
  • The collection view which displays the menu.

    Declaration

    Swift

    open private(set) lazy var collectionView: MenuCollectionView { get set }
  • The view above the menu, where the contentViewController‘s view is added to.

    Declaration

    Swift

    open private(set) lazy var workspaceView: UIView { get set }
  • The view that hosts the collectionView. It extends below the bottom safeAreaLayoutGuide if needed.

    Declaration

    Swift

    open private(set) lazy var accessoryView: UIView { get set }
  • The height of the menu. Default is 88.

    Declaration

    Swift

    open var menuHeight: CGFloat { get set }
  • Whether the menu is currently hidden or not.

    Declaration

    Swift

    open private(set) var isMenuHidden: Bool
  • Shows the menu.

    Declaration

    Swift

    open func showMenu(animated: Bool)

    Parameters

    animated

    Whether this change should be animated or not.

  • Hides the menu.

    Declaration

    Swift

    open func hideMenu(animated: Bool)

    Parameters

    animated

    Whether this change should be animated or not.