VOTabStripContainerViewController

@interface VOTabStripContainerViewController : UINavigationController

Manages an array of view controller instances, and presents them within an Android style tab strip interface.

The view controllers specified in tabViewControllers are presented within a UINavigationController. Switching tabs resets this navigation controller’s root view controller to the appropriate entry in tabViewControllers. The titleView of each root view controller’s navigationItem is managed by this controller, and is used to host the segmented control that presents the tab strip interface.

Titles for the tabs are taken from each view controller’s title attribute.

  • The index into tabViewControllers of the currently visible tab. Set this to programatically update the selectred tab

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        NSInteger selectedTabViewControllerIndex;

    Swift

    var selectedTabViewControllerIndex: Int { get set }
  • The view controllers being managed by this controller

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSArray<UIViewController *> *tabViewControllers;

    Swift

    var tabViewControllers: [UIViewController]! { get }
  • The style this view controller is using to present itself

    Declaration

    Objective-C

    @property (readonly, nonatomic) VOTabStripContainerViewControllerStyle style;

    Swift

    var style: VOTabStripContainerViewControllerStyle { get }
  • The segmented control which presents the tab strip interface. Direct access to this is discouraged; use (or update) the appropriate theme instead

    Declaration

    Objective-C

    @property (readonly, nonatomic) HMSegmentedControl *segmentedControl;

    Swift

    var segmentedControl: HMSegmentedControl! { get }
  • Designated initializer for this class

    Declaration

    Objective-C

    - (instancetype)
        initWithViewControllers:(NSArray<UIViewController *> *)tabViewControllers
                          style:(VOTabStripContainerViewControllerStyle)style;

    Swift

    init!(viewControllers tabViewControllers: [UIViewController]!, style: VOTabStripContainerViewControllerStyle)

    Parameters

    tabViewControllers

    The view controllers to be managed by this container view controller

    style

    The style to use when presenting this controller