Will Larche 2ab08f4133 [Catalog & Examples] Added navigationBar example in Swift (Supplemental POC) and corrected slight mistake in Catalog by Convention logic.
Summary: Merge branch 'develop' of https://github.com/google/material-components-ios into develop

Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: ajsecord, featherless, #mdc_ios_owners

Subscribers: featherless, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D587
2016-04-13 14:56:49 -04:00
..
2016-03-01 13:04:33 -05:00

title layout section excerpt
Header Stack View detail components The Header Stack View component is a view that coordinates the layout of two vertically stacked bar views.

Header Stack View

Header Stack View

The Header Stack View component is a view that coordinates the layout of two vertically stacked bar views.

Material Design Specifications

API Documentation


Installation

Requirements

  • Xcode 7.0 or higher.
  • iOS SDK version 7.0 or higher.

Installation with CocoaPods

To add this component to your Xcode project using CocoaPods, add the following to your Podfile:

pod 'MaterialComponents/HeaderStackView'

Then, run the following command:

$ pod install

Overview

This view's sole purpose is to facilitate the relative layout of two horizontal bars.

The top bar is typically a navigation bar. The bottom bar, when provided, is typically a tab bar.


Usage

Importing

Before using Header Stack View, you'll need to import it:

Objective-C

#import "MaterialHeaderStackView.h"

Swift

import MaterialComponents

Header Stack View provides MDCHeaderStackView, which is a UIView subclass.

Objective-C

MDCHeaderStackView *headerStackView = [[MDCHeaderStackView alloc] init];

Swift

You may provide a top bar:

Objective-C

headerStackView.topBar = navigationBar;

Swift

headerStackView.topBar = navigationBar

You may provide a bottom bar:

Objective-C

headerStackView.bottomBar = tabBar;

Swift

headerStackView.bottomBar = tabBar