BMViewWithViewControllerAndViewModel

public protocol BMViewWithViewControllerAndViewModel : BMViewWithViewModel

A BMViewWithViewControllerAndViewModel is a BMViewWithViewModel view managed by a UIViewController. This “managing” automatically calls the configure, style and layout phases. In addition, the controller set the viewModel of the view, therefore invoking the update at least once before the view is actually displayed. This view is extended with helpers allowing to access the UINavigationBar, UINavigationItem, UIViewController from the view when present.

  • viewController Default implementation

    The UIViewController managing the view.

    Default Implementation

    Syntactic sugar to access the UIViewController managing this UIView.

    Declaration

    Swift

    var viewController: UIViewController? { get set }
  • navigationBar Extension method

    A shortcut to access UINavigationController from the view when available.

    Declaration

    Swift

    var navigationBar: UINavigationBar? { get }
  • navigationItem Extension method

    A shortcut to access UINavigationItem from the view when available.

    Declaration

    Swift

    var navigationItem: UINavigationItem? { get }