21 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
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
Robert Moore
03f3351ad5
Global replace of single-precision floats with CGFloat casts. (#5718)
Replacing all non-integral, single-precision floating point literals with double-precision values explicitly cast to CGFloat.  For example, `0.1f` should become `(CGFloat)0.1`.

Regex used:
```
([0-9]*\.)([0-9]*?)([1-9]+)([0-9]*?)[fF]
```

PiperOrigin-RevId: 220683126
2018-11-12 10:50:01 -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
Yarden Eitan
3480c50c67
updated to newest CbC standard (#4956)
Move to the new CbC standard released in CatalogByConvention v2.5.0. See PR: material-foundation/cocoapods-catalog-by-convention#27 for more info on the change.
2018-08-29 20:45:13 -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
e923d2d928
[Catalog] Make many examples be dragons. (#3642)
Pivotal story: https://www.pivotaltracker.com/story/show/156939988
Pivotal story: https://www.pivotaltracker.com/story/show/156804299
Pivotal story: https://www.pivotaltracker.com/story/show/156939962
Pivotal story: https://www.pivotaltracker.com/story/show/156982119
Closes: https://github.com/material-components/material-components-ios/issues/3183
2018-05-02 08:31:55 -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
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
Robert Moore
e03186525d
[Examples/Tests] Convert @imports to imports (#2761)
In order to make the internal build systems happier, @import statements should not be used.
2017-12-22 12:30:25 -05:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Randall Li
b1ec22207f
Fixed float conversion build errors (#2602)
* Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480

* More Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480
2017-12-06 15:57:04 -05:00
Andrés
2d8a51e5d5
[Tabs] Internal fixes to account for the Safe Area insets. (#2261)
* [TabBar] Fixes for Safe Area insets.

* [TabBar] Check bar position.

* [TabBar] Add back intrinsicContentSize for consistency with sizeThatFits.

* [TabBar] RTL fixes

* [TabBar] Call setNeedsUpdateConstraints to match UIKit.

* [TabBar] Remove need for maintaining a height constraint for auto layout.

* [TabBar] Undo sizeThatFits/intrinsicContentSize changes.

* [TabBar] Revert more things.

* [TabBar] Undo more stuff.

* [TabBar] Review
2017-10-31 14:14:21 -04:00
Adrian Secord
479f7b1141 Remove trailing whitespace everywhere. (#2168) 2017-10-13 11:33:35 -04:00
Will Larche
96fb533554 [Catalog] Fixes improper use of Bundle and assets (#2118)
* [Catalog] Fixing bundle usage in some examples.

* [Examples] Correcting use of assets and bundles.

* [Examples] Formatting.
2017-10-08 15:04:48 -04:00
Robert Moore
601789c8c9 [Catalog] Bottom Navigation example should use safeAreaInsets (#1976)
The Bottom Navigation example for Tabs was overlapping with the Home Screen
indicator on the iPhone X. The example will now use safeAreaInsets if available
to calculate the position of the tab bar.

Closes #1975
2017-09-14 09:45:15 -04: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
Brian Moore
a680e30a56 [Tabs] Bottom navigation support (#1411)
* [Tabs] Bottom navigation support

* [Tabs] Formatting pass and slight edits

* [Tabs] Small updates based on code review
2017-05-31 11:19:03 -04:00