Skip to content

Commit

Permalink
[Tabs] Update TabBarView documentation. (#8489)
Browse files Browse the repository at this point in the history
Adding a section describing the change in behavior for `selectedItem` when
`items` is set.

Follow-up to #7672
  • Loading branch information
Robert Moore committed Sep 24, 2019
1 parent f5a2369 commit 4e6ad99
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/Tabs/README.md
Expand Up @@ -8,7 +8,7 @@ path: /catalog/tabs/
api_doc_root: true
-->

<!-- This file was auto-generated using ./scripts/generate_readme Tabs -->
<!-- This file was auto-generated using scripts/generate_readme Tabs -->

# Tabs

Expand Down Expand Up @@ -402,6 +402,13 @@ Subclassing is not supported by `MDCTabBarView`. Any requirements that you have
for Material Tabs that are not met by the public APIs should be filed as a
feature request or bug against `MDCTabBarView`.
#### Selected Item Behavior
`MDCTabBarView` does not automatically mark any item as *selected* when the
`items` array is set, unless the previously-selected item is in the new
`items` array. This is a change from `MDCTabBar`, but ensures that the view
and its APIs present equivalent information.
#### Colors, Fonts, and Theming
To set the image tint colors, use `- setImageTintColor:forState:`. The
Expand Down Expand Up @@ -455,6 +462,7 @@ subclass conforming to the `MDCTabBarItemCustomViewing` protocol is provided as
`MDCTabBarItem`.
<!--<div class="material-code-render" markdown="1">-->
##### Swift
```swift
let customView = MyCustomTabView()
Expand Down
7 changes: 7 additions & 0 deletions components/Tabs/docs/tabbarview.md
Expand Up @@ -58,6 +58,13 @@ Subclassing is not supported by `MDCTabBarView`. Any requirements that you have
for Material Tabs that are not met by the public APIs should be filed as a
feature request or bug against `MDCTabBarView`.
#### Selected Item Behavior
`MDCTabBarView` does not automatically mark any item as *selected* when the
`items` array is set, unless the previously-selected item is in the new
`items` array. This is a change from `MDCTabBar`, but ensures that the view
and its APIs present equivalent information.
#### Colors, Fonts, and Theming
To set the image tint colors, use `- setImageTintColor:forState:`. The
Expand Down

0 comments on commit 4e6ad99

Please sign in to comment.