13 Commits

Author SHA1 Message Date
Randall Li
502bc5d910 Ran a Swift formatter
PiperOrigin-RevId: 395947664
2021-09-10 09:48:14 -07:00
Bryan Oltman
e67d2e5b66
[Catalog] Add close button to bottom drawer example header (#8963)
* [Catalog] Add close button to bottom drawer example header

* formatting

* Add heading accessibility trait to DrawerHeaderViewController titleLabel
2019-11-15 15:10:05 -05:00
Randall Li
08fa1a3638
[BottomDrawer] Minor change to example to help debug some bugs. (#8467)
Added a text label to the content view to more easily see scrolling ocuring in the example.
2019-09-19 12:36:14 -04:00
Yarden Eitan
5a98df2b39
[NavigationDrawer] Navigation Drawer Present at Fullscreen (#5995)
This PR closes #5600 .

The drawer now has added functionality allowing users to expand the drawer to full screen with duration and completion. 
Clients have asked for this functionality, and it is also providing the expand to full screen functionality correctly even when the content is less than the full height of the screen.
2018-12-13 11:15:43 -05:00
Yarden Eitan
380242e0b7
added additional example with limited content that doesnt reach fullscreen (#5743)
Addition of a non fullscreen nav drawer example that is important for testing and showing a different behavior the drawer can provide.
2018-11-13 16:36:08 -05:00
Yarden Eitan
c9f2279af9
[NavigationDrawer] Adding a top inset delegate for the drawer (#5674)
**Context:**
Clients need a way to know the content inset of the drawer to be able to lay out their content appropriately.

**The Problem:**
Because things like the status bar, safe area, and the top handle take up more space at the top of the drawer, the content that is laid out initially will be clipped if not able to move the content appropriately as the drawer is dragged.

**The Fix:**
Add an MDCBottomDrawerViewControllerDelegate that listens to topInset changes as the drawer is dragged and provides the top inset in which the content should be laid out below.

**Testing:**
Unit Test + Tested on an iPhone X and iPhone 7 on all examples, portrait and landscape.
2018-11-08 15:14:56 +02:00
guylivneh
08b71a81ee [BottomDrawer] Adding an example for dynamically changing content size (#5545)
Adding an example for dynamically changing content size.
2018-10-29 17:52:24 +02:00
Yarden Eitan
5dafdbaa86
graduate navigation drawer from Beta to Ready (#5470)
This PR is the last step in graduating the Navigation Drawer component from Beta to Ready.

We have resolved all the outstanding issues in the Navigation Drawer Project here: https://github.com/material-components/material-components-ios/projects/85 and hotlist: 1230549 .
The only outstanding issue is the unit tests ( #5466 , #5465 ) which were approved and are pending due to GitHub issues causing CI not to run.

We are essentially migrating here the NavigationDrawer component from the MaterialComponentsAlpha podspec to the MaterialComponents podspec so it can be used publicly using the normal means of installing our Pod.

This PR is blocked and can land once #5466 and #5465 land.

Closes #5333
2018-10-23 01:26:46 -04:00
rami-a
70457a398a
[NavigationDrawer] Add Color Themer support (#5458)
### The problem

BottomDrawer previously had no color themer support

### The fix

This change adds a color themer for BottomDrawer. Additionally this adds unit tests and updates the example to use the color themer. The guidelines indicate the content and header should utilize the semantic surface color, so that is what the themer applies to the BottomDrawer. 

**Note:** The drawer should be configured with its header and content ViewControllers before applying the theme.

### Related issues

Closes #4910 

### Code snippet

#### Swift
```
    let bottomDrawerViewController = MDCBottomDrawerViewController()
    bottomDrawerViewController.contentViewController = contentViewController
    bottomDrawerViewController.headerViewController = headerViewController
    MDCBottomDrawerColorThemer.applySemanticColorScheme(colorScheme,
                                                        toBottomDrawer: bottomDrawerViewController)
```

#### ObjC
```
MDCBottomDrawerViewController *bottomDrawer = [[MDCBottomDrawerViewController alloc] init];
bottomDrawer.contentViewController = contentViewController
bottomDrawer.headerViewController = headerViewController
[MDCBottomDrawerColorThemer applySemanticColorScheme:self.colorScheme
                                      toBottomDrawer:bottomDrawer];
```
2018-10-19 15:36:58 -04:00
Anuran Barman
b71390dbc4 [NavigationDrawer] Made DrawerHeaderViewController.swift file to conform to MDCBottomDrawerHeader to fix header not showing issue in components examples (#5325)
Added conformation to MDCBottomDrawerHeader for DrawerHeaderViewController.swift file in **NavigationDrawer** examples as it was not showing up if code was run.
2018-10-16 13:58:54 -04:00
Robert Moore
aef3cc73af
[NavigationDrawer] Fix Swift imports in examples. (#5096)
The Swift examples were not compiling internally because they were
missing many imports.
2018-09-11 14:52:07 -04:00
featherless
2181084272
[automated] Standardize our open source license stanza to what Xcode generates. (#4985)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at

http://www\.apache\.org/licenses/LICENSE-2\.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at
 http://www\.apache\.org/licenses/LICENSE-2\.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
2018-08-31 12:13:07 -04:00
guylivneh
b2d17e1ed6 [NavigationDrawer] Adding the navigation drawer component (#4886)
Adding the navigation drawer component that adds a presentation controller for showing UIViewControllers as a bottom drawer.

History of the component (last CL submitted for it): cl/209765207
Design doc: go/mdc-ios-navigation-drawer

This component will be the first alpha component in this repo, this means that it can still change and will not be included as part of the podspec at first.
2018-08-27 16:00:40 -04:00