Skip to content

Commit

Permalink
Additional requested docs changes
Browse files Browse the repository at this point in the history
Closes #10147

COPYBARA_INTEGRATE_REVIEW=#10147 from andrewoverton:material-io-bugs-2 d0e70d8
PiperOrigin-RevId: 348026588
  • Loading branch information
andrewoverton authored and material-automation committed Dec 17, 2020
1 parent e946f7e commit b42de42
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 52 deletions.
15 changes: 2 additions & 13 deletions components/AppBar/README.md
Expand Up @@ -21,7 +21,6 @@ information and actions relating to the current screen.

* [Using top app bars](#using-top-app-bars)
* [Regular top app bar](#regular-top-app-bar)
* [Contextual action bar](#contextual-action-bar)
* [Theming](#theming)
* [Migration guides](#migration-guides)
* [Unsupported](#unsupported)
Expand Down Expand Up @@ -104,16 +103,10 @@ NSLog(@"accessibilityLabel: %@",self.navigationItem.rightBarButtonItem.accessibi
```
<!--</div>-->
## Types
There are two types of top app bar:
1. [Regular top app bar](#regular-top-app-bar)
1. [Contextual action bar](#contextual-action-bar)
![Regular top app bar and contextual action bars](docs/assets/appbar-types.png)
## Regular top app bar
![Example of an iOS regular top app bar](docs/assets/app-bar-example.png)
Regular top app bars are the only top app bars supported on iOS.
### Top app bar examples
Expand Down Expand Up @@ -641,10 +634,6 @@ See the [FlexibleHeader](../FlexibleHeader) documentation for additional usage g
-------------------------------- | -------------------- | ------------------------------------------ | -------------
**Icons** | `-[UIViewController navigationItem]` | `-setLeftBarButtonItems:`<br>`-leftBarButtonItems`<br>`-setRightBarButtonItems:`<br>`-rightBarButtonItems` | `nil`

## Contextual action bar

Contextual action bars are not implemented on iOS.

## Theming

`MDCAppBarViewController` supports Material Theming using a Container Scheme. To theme your app bar, add the `AppBar+Theming` subspec to your `Podfile`:
Expand Down
Binary file added components/AppBar/docs/assets/app-bar-example.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed components/AppBar/docs/assets/appbar-types.png
Binary file not shown.
4 changes: 0 additions & 4 deletions components/BottomAppBar/README.md
Expand Up @@ -121,10 +121,6 @@ trailingButton.accessibilityHint = @"Purchase the item";
```
<!--</div>-->
## Types
There is only one type of bottom app bar.
## Bottom app bar
Bottom app bars group primary and secondary actions at the bottom of the screen, where they are easily reachable by the user's thumb.
Expand Down
4 changes: 0 additions & 4 deletions components/BottomNavigation/README.md
Expand Up @@ -135,10 +135,6 @@ override func viewWillLayoutSubviews() {

```

## Types

There is only one type of bottom navigation bar.

## Bottom navigation bar

![A bottom navigation item with home, mail, favorites, reader, and birthday sections](docs/assets/bottom-nav-example.png)
Expand Down
12 changes: 1 addition & 11 deletions components/Buttons/docs/buttons.md
Expand Up @@ -20,7 +20,6 @@ api_doc_root: true
* [Text button](#text-button)
* [Outlined button](#outlined-button)
* [Contained button](#contained-button)
* [Toggle button](#toggle-button)
* [Theming](#theming)

- - -
Expand Down Expand Up @@ -163,12 +162,7 @@ this day."

## Types

There are four types of buttons:

1. [Text button](#text-button)
2. [Outlined button](#outlined-button)
3. [Contained button](#contained-button)
4. [Toggle button](#toggle-button) (*not supported in iOS*)
There are four types of buttons: 1. [Text button](#text-button) 2. [Outlined button](#outlined-button) 3. [Contained button](#contained-button) 4. Toggle button (*not supported in iOS*)"

![Example of the four button types](assets/buttons_types.png)

Expand Down Expand Up @@ -344,10 +338,6 @@ A contained button has a text label, a container, and an optional icon.
**Icon** | `imageView` | `setImage:forState:`<br/>`imageForState:` | `nil`
**Color** | `imageView.tintColor` | `setImageViewTintColor:forState:`<br/>`imageViewTintColorForState:` | `nil`
## Toggle button
[Toggle buttons](https://material.io/components/buttons/#toggle-button) can be used to select from a group of choices. They are not supported on iOS.
## Theming
You can theme an `MDCButton` to match any of the Material Button styles using theming
Expand Down
6 changes: 1 addition & 5 deletions components/Buttons/docs/fabs.md
Expand Up @@ -142,11 +142,7 @@ this day."

## Types

There are three types of FABs:

1. [Regular FABs](#regular-fabs)
2. [Mini FABs](#mini-fabs)
3. [Extended FABs](#extended-fabs)
There are three types of FABs: 1\. [Regular FABs](#regular-fab) 2\. [Mini FABs](#mini-fab) 3\. [Extended FABs](#extended-fab)

![Three FABs, one of each type.](assets/fab-types.png)

Expand Down
4 changes: 1 addition & 3 deletions components/Cards/README.md
Expand Up @@ -175,8 +175,6 @@ card.accessibilityLabel = [NSString
```
<!--</div>-->
## Types
## Card
![Card with sample image and buttons](docs/assets/custom-card.png)
Expand Down Expand Up @@ -299,7 +297,7 @@ _**Note:** All the optional elements of a card's content are implemented through
**Elevation** | N/A | `-setShadowElevation:forState:`<br/>`-shadowElevationForState:` | 1
**Ripple color** | `rippleView.rippleColor` | N/A | `nil`
### Theming
## Theming
Cards supports Material Theming using a Container Scheme. `MDCCard` and `MDCCardCollectionCell` have both default and outlined theming methods. Learn more about theming extensions [here](../../docs/theming.md). Below is a screenshot of an `MDCCard` with the Material Design Shrine theme:
Expand Down
15 changes: 3 additions & 12 deletions components/Dialogs/README.md
Expand Up @@ -86,20 +86,11 @@ the `-performAccessibilityEscape` method in your custom dialog view controller c
}
```

## Types

There are four types of dialogs:

1. [Alert](#alert-dialog)
1. Simple
1. Confirmation
1. Full-screen

![Examples of the four types of dialogs.](docs/assets/dialogs-types.png)

## Alert dialog

The alert style is the only style supported on iOS. Consider using the [ActionSheet](https://github.com/material-components/material-components-ios/blob/develop/components/ActionSheet/README.md) component in situations where one of the unsupported dialog types would have been appropriate.
![Example alert dialog with lorem ipsum sample text.](docs/assets/alert-example.png)

Alerts are the only type of dialog supported on iOS. Consider using the [ActionSheet](https://github.com/material-components/material-components-ios/blob/develop/components/ActionSheet/README.md) component in situations where one of the unsupported dialog types would have been appropriate.

To present either an `MDCAlertController` or a custom dialog view controller, set its `modalPresentationStyle`
property to `UIModalPresentationCustom` and its `transitioningDelegate` property to an
Expand Down
Binary file added components/Dialogs/docs/assets/alert-example.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b42de42

Please sign in to comment.