MDCTabBarViewController

@interface MDCTabBarViewController
    : UIViewController <MDCTabBarDelegate, UIBarPositioningDelegate>

The MDCTabBarViewController class manages a set of view controllers, showing their UITabBarItems as tappable items in a bottom MDCTabBar. When the user taps one of those items, the corresponding view controller appears.

  • The tab bar controller’s delegate.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<MDCTabBarControllerDelegate>
        delegate;
  • The array of view controllers managed by the tab bar controller. The currently selected view controller must be one of these.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nonnull)
        NSArray<UIViewController *> *viewControllers;
  • The currently selected view controller. Setting it switches without animation. It must be one of the items in the view controllers array.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable)
        UIViewController *selectedViewController;
  • The tab bar which allows the user to switch between view controllers. You can use this property to set colors but hide it, show it, and select items in it using methods of this class.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) MDCTabBar *tabBar;
  • Use this to show and hide the tab bar. Same as setTabBarHidden:animated:NO

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL tabBarHidden;
  • Use this to show and hide the tab bar. If animated, hides by panning the tab bar down.

    Declaration

    Objective-C

    - (void)setTabBarHidden:(BOOL)hidden animated:(BOOL)animated;