16 Commits

Author SHA1 Message Date
Andrew Overton
38840677ff
[Tabs] Don't use MDCTabBarColorThemer in examples (#9125)
This PR makes it so that Tabs examples use the theming extension instead of the themer.

Related to #9061.
Related to #9063.
Related to #9062.
2019-12-05 15:30:13 -05:00
Yarden Eitan
e78713078a
[Tabs] Adds the Ripple behavior to Tabs. (#7583)
## Related links
* Bug: Closes #7379 
* Ripple: [MDCRippleTouchController](https://github.com/material-components/material-components-ios/tree/develop/components/Ripple)

## Introduction
This PR integrates [`MDCRippleTouchController`](https://github.com/material-components/material-components-ios/blob/develop/components/Ripple/src/MDCRippleTouchController.h) into [`MDCTabBar`](https://github.com/material-components/material-components-ios/tree/develop/components/Tabs). This behavior is an opt in flag property added to MDCTabBar, `enableRippleBehavior`.  This improves the visual touch feedback for our users as MDCInkView didn't support our current motion guidelines. We are also marking any of the Ink APIs ToBeDeprecated as part of the [Deprecation Policy](cb6b8e9599/contributing/deprecation_policy.md (step-4-add-a-comment-to-the-api-indicating-that-it-will-be-deprecated)).

## Videos
| Before | After |
| - | - |
|![oldRipple](https://user-images.githubusercontent.com/4066863/59460503-38219000-8ded-11e9-938f-fadf0596cc5f.gif)|![newRipple](https://user-images.githubusercontent.com/4066863/59460535-525b6e00-8ded-11e9-97dd-9285aba8e290.gif)|
2019-06-15 12:48:22 -04:00
Robert Moore
800188a649
{clang-format} Format the components. (#6347)
This is a follow-up to https://github.com/material-components/material-components-ios/pull/6027

```
find components \( -name "*.h" -or -name "*.m" \) | xargs clang-format -i
```
2019-01-23 11:08:43 -05:00
Robert Moore
372d6b24f9
No longer using -init for Color Scheme. (#5734)
{MDC iOS} No longer using `-init` for Color Scheme.

Based on the discussions in go/mdc-ios-theming, we should not use the `-init` default initializer. Instead, we should use an explicit set of defaults.

Search regex: '\[\[MDCSemanticColorScheme alloc\] init\]'
2018-11-12 12:54:47 -05: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
Wenyu Zhang
4b00a6c745
[Tabs] fix TabBarViewControllerExample to respect safe area (#4949)
closes #3728 

### Before

![b1](https://user-images.githubusercontent.com/8836258/44799553-351d2200-ab82-11e8-9548-f0eb54cf2769.png)

### After:

![a1](https://user-images.githubusercontent.com/8836258/44799555-364e4f00-ab82-11e8-8aec-6b6316374f9b.png)
2018-08-30 15:26:46 -04:00
featherless
50e1fd091d
[Catalog] Conversion to new App Bar View Controller API (#4696)
This PR updates the catalog to use the new MDCAppBar API throughout.
2018-08-07 09:30:37 -04:00
John Detloff
0c0ce4248e
Initialize default color and typography schemes in examples (#4200)
Ensure a default colorScheme and typographyScheme is initialized for examples.
2018-05-21 12:44:43 -04:00
featherless
08403aecf7
[Tabs] Add umbrella headers for all extension targets. (#3476)
Also updated all imports to make use of the umbrella headers.

Pivotal story: https://www.pivotaltracker.com/story/show/157045283
2018-04-26 21:20:08 -04:00
featherless
32138a9118
[Tabs] Replace MDCRaisedButton with contained button themer. (#3497)
Pivotal story: https://www.pivotaltracker.com/story/show/157102119

## Screenshots

### Before

![simulator screen shot - iphone se - 2018-04-25 at 16 53 31](https://user-images.githubusercontent.com/45670/39272389-c6b33dbc-48a9-11e8-9c40-3647ab52fefa.png)
![simulator screen shot - iphone se - 2018-04-25 at 16 53 29](https://user-images.githubusercontent.com/45670/39272390-c6c051dc-48a9-11e8-8dc2-fcb6fe390b0e.png)

### After

![simulator screen shot - iphone se - 2018-04-25 at 16 54 42](https://user-images.githubusercontent.com/45670/39272403-cc8551a8-48a9-11e8-829b-9f82bfc6c455.png)
![simulator screen shot - iphone se - 2018-04-25 at 16 54 41](https://user-images.githubusercontent.com/45670/39272404-cc937774-48a9-11e8-9633-ec4a6fbab646.png)
2018-04-26 12:54:18 -04:00
Yarden Eitan
7f7bc36202
[Catalog] Expose colorScheme + typographyScheme properties for all examples to use app wide theming (#3478)
Made colorScheme and typographyScheme properties in the class interfaces for all our examples.
Moved theming away from example inits and into viewDidLoad
Small update for slider example to allow it to grab the theming properly.
Related Pivotal: https://www.pivotaltracker.com/story/show/156616695
2018-04-25 15:15:17 -04:00
John Detloff
7799a15025
Update MDCTabBar color themer (#3361)
https://www.pivotaltracker.com/story/show/156171753


Before:
https://user-images.githubusercontent.com/1418389/38756680-56e300aa-3f38-11e8-8ab3-c4cae293c689.png
https://user-images.githubusercontent.com/1418389/38756681-574887e0-3f38-11e8-99bf-e4993d093a8a.png
https://user-images.githubusercontent.com/1418389/38756682-575790aa-3f38-11e8-858e-a44fe1312875.png
https://user-images.githubusercontent.com/1418389/38756683-576b5b94-3f38-11e8-9cb6-3f0b7bf49b55.png
https://user-images.githubusercontent.com/1418389/38756684-577a85ce-3f38-11e8-96f7-2b5d6a600ff8.png
https://user-images.githubusercontent.com/1418389/38756685-57854748-3f38-11e8-9fb9-2ba5c7c9142b.png
https://user-images.githubusercontent.com/1418389/38756686-57902276-3f38-11e8-91a6-d34bf054553f.png
https://user-images.githubusercontent.com/1418389/38756687-579e0684-3f38-11e8-9f3a-7b335aa0b9c7.png

After:
https://user-images.githubusercontent.com/1418389/38756708-6825c8c0-3f38-11e8-9f00-bc5a871cc26b.png
https://user-images.githubusercontent.com/1418389/38756709-68338faa-3f38-11e8-89c5-588cba6711f6.png
https://user-images.githubusercontent.com/1418389/38756710-68443d46-3f38-11e8-8894-8d11096e0650.png
https://user-images.githubusercontent.com/1418389/38756711-68502836-3f38-11e8-8cba-2f492c25042a.png
https://user-images.githubusercontent.com/1418389/38756713-685fa5d6-3f38-11e8-868a-5481e1a8d5f1.png
https://user-images.githubusercontent.com/1418389/38756714-686a62b4-3f38-11e8-8a36-b4fd948ea00b.png
https://user-images.githubusercontent.com/1418389/38756715-6875927e-3f38-11e8-9a9a-5371514156a5.png
https://user-images.githubusercontent.com/1418389/38756716-68817f26-3f38-11e8-8d2b-162dda9a6780.png
2018-04-17 14:23:36 -04:00
Yurii Samsoniuk
2a96682230 Replace unnecessary imports with forward declarations (#2429)
* [Themes] Remove unnecessary imports.

* [TextFields] Remove unnecessary imports.

* [Typography] Do not use an umbrella header inside of a component.

* [Snackbar] Do not use self umbrella header.

* [ActivityIndicator] Do not use self umbrella header.

* [AppBar] Use umbrella headers.

* [AppBar] Remove self import header.

* [ButtonBar] Removed self umbrella header imports.

* [Buttons] Removed self umbrella header imports.

* [Collections] Update imports.

* [Dialogs] Moved import into an m file.

* [Collections] Fixed imports.

* [FeatureHighlight] Removed self umbrealla imports.

* [HeaderStackView] Reordered imports.

* [Ink] Replaced imports with forward declarations.

* [Slider] Replaced self umbrella import use.

* [Snackbar] Removed self umbrella header import.

* [Tabs] Changed math import. Replaced self umbrella header import.

* [Icons] Removed unnecessary imports.

* [Overlay] Replaced umbrella header import.

* [ShapeLibrary] Replace Shapes imports with an umbrella header.

* [Shapes] Replaced imports with forward declarations.

* [AppBar] Replace import with a forward declaration.

* [Examples] Updated imports.

* Fixed conflicting imports

* Added space between different import categories
2017-11-16 18:25:06 -05:00
Robert Moore
8940d77d6d [Catalog] Verify all examples provide CatalogByConvention methods (#1911)
All examples now have at least the required `+catalogBreadcrumbs` and `+catalogIsPrimaryDemo`.  All examples in the same breadcrumbs path have only one primary demo.  There should be only one `-catalogDescription` attached to the primary demo.

Closes #1897
2017-08-31 08:46:10 -04:00
Adrian Secord
206b0bf39b Added missing license stanzas. (#1768) 2017-08-10 17:16:33 -04:00
ianegordon
f88dc55511 [Tabs] Add MDCTabViewController (#1482)
* MDCTabBarViewController - like UITabBarViewController, but uses Material Design's MDCTabBar

* MDCTabBarViewController Interface Builder example

It's integrated into the Catalog app as a Tab example. Also demonstrates moving the tab bar from the unselected state to the selected state. Note: this reveals a bug with the unselected state that https://github.com/material-components/material-components-ios/pull/1441 fixes.

* Copyright date is 2017 for these TabBarViewController files. Fix white space issues.

* Add <UITabBarItem *> to local variable in updateTabBarItems

* Address Brian Moore's comments: ran clang-format -style=file on these files,
Modified tabBar delegate protocol: tabBar:willSelectItem: becomes tabBar:shouldSelectItem:
so that MDCTabBarViewController can have a 'shouldSelect' delegate.

* comment correction of ViewController to view controller.

* Add new API to MDCItemBar in preparation for deprecating willSelect: from the delegate protocol, replacing it with shouldSelect:. Revert changes to comment lines that appear to be a mis-configuration at my end to 80 columns.

* Tested more thoroughly, verified that the class still works.

* Restore the delegate willSelect method that we intended in favor of shouldSelect:

* Simplify private/MDCItemBar's delegate protocol, write MDCTabBar public protocol in terms of it, as Brian asked.

* Comment fixes.

* Address Brian Moore's May 31 comments. Adjust color of TabBar in Interface builder example.

* Update README.md
2017-06-06 17:32:21 -04:00