222 Commits

Author SHA1 Message Date
Jeff Verkoeyen
fbb1f20aa2 Internal change
PiperOrigin-RevId: 332151481
2020-09-16 21:01:21 -07:00
Jeff Verkoeyen
d7ff705337 Drop support for iOS 9.
PiperOrigin-RevId: 326015653
2020-08-11 07:21:40 -07:00
Andrew Overton
07c46757cc Replace material.io API doc links with links to the relevant header f…
This PR replaces API links containing "/api-docs/" with links to suitable header files in GitHub because the site previously linked to is being taken down and replaced with something that won't handle API docs.

Closes https://github.com/material-components/material-components-ios/pull/10045

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10045 from andrewoverton:replace-mio-api-docs-with-github-links 0d6e56cc11d0c147366a4f6cde829d8b51567ecc
PiperOrigin-RevId: 323424362
2020-07-27 13:09:23 -07:00
Jeff Verkoeyen
244dd62b6c [Typography] Use MDFTextAccessibility's isLargeForContrastRatios.
This is part of a larger effort to break apart and trim down the size of our typography solutions.

PiperOrigin-RevId: 316484500
2020-06-15 09:53:32 -07:00
Jeff Verkoeyen
efea2ddce6 Internal change
PiperOrigin-RevId: 311020225
2020-05-13 14:37:54 +00:00
Wenyu Zhang
a3381717f7
Fix the bazel BUILD files and snapshot that were restored unintentionally.(#9983) 2020-04-29 11:00:00 -04:00
Randall Li
0100cfe414 [MDC-iOS/BottomSheet] Fix dismissOnDraggingDownSheet behavior
The bottom sheet incorrectly allowed the sheet to be drag dismissed when `dismissOnDraggingDownSheet` was set to NO.

This change permits the gesture to dismiss to begin but prevents it from actually closing the sheet.

https://github.com/material-components/material-components-ios/issues/9723

Closes https://github.com/material-components/material-components-ios/pull/9885

PiperOrigin-RevId: 307802500
2020-04-22 06:21:26 -07:00
Jeff Verkoeyen
8abbb099a9 Delete all bazel support.
We no longer support bazel.

This PR deletes everything related to bazel support from our repo.

Closes https://github.com/material-components/material-components-ios/pull/9968

PiperOrigin-RevId: 306227127
2020-04-13 07:13:47 -07:00
featherless
3b96c0b37e
[Typography] Remove unused import in //components/Typography:SwiftExamples. (#9367)
Prep work for https://github.com/material-components/material-components-ios/issues/5491
2020-01-02 11:01:03 -05:00
Randall Li
b86e38f249
[UIApplication] Use prefix on category name for UIApplication+AppExtensions so that category names don't conflict in ObjC namespace. (#9277)
[UIApplication] Use prefix on category name for UIApplication+AppExtensions so that category names don't conflict in ObjC namespace.

sourced from cl/285233749
2019-12-20 13:24:53 -05:00
Randall Li
afbd7351b5 [Typography] Using safeSharedApplication in test (#8815)
I needed to change this to run test locally in my simulator.

I'm not sure why this wasn't caught in CI.
2019-11-15 07:31:27 -08:00
Robert Moore
2550aa00b3 [Typography] Remove checks for systemFontOfSize:weight:. (#8581)
Removing conditional checks and guards for the API since we now support iOS 9
as the minimum iOS version and no longer support Xcode 9.

Part of #8580
2019-10-15 00:29:35 -04:00
Randall Li
1eaff651f9 Reran ./scripts/generate_all_readmes (#8557)
Moved changes from https://github.com/material-components/material-components-ios/pull/7360 to the source Readme file

Also some readme files got a minor addition to add `./` in their generation comment
2019-10-11 10:44:43 -04:00
Robert Moore
d8858723ef
[Typography] Fix scaling test. (#8477)
Corrects a bug in an font scaling test that assumed the test host had its
content sizes category set to `UIContentSizeCategoryLarge`.

Discovered while authoring #8476.
2019-09-23 10:33:34 -04:00
Robert Moore
80e8c3252e
[Typography] Use Starlark macros. (#8199)
Use more Starlark macros in the BUILD file. This makes releasing easier.

Part of #8150
2019-08-02 16:34:36 -04:00
Robert Moore
ae72826167
[Typography] Drop iOS 8 pragmas. (#8119)
Dropping iOS 8-specific work-arounds now that we no longer support it.

Part of #1296
2019-07-30 12:43:15 -04:00
Robert Moore
e64c440035
[Typography] Internal comments to explain font scaling. (#8087)
Add an explanation of how scalable fonts calculate the final point size of a scaled font.

PiperOrigin-RevId: 259536043
2019-07-25 13:39:18 -04:00
Wenyu Zhang
8735ebb8e8
[Typography] Add doc to explain fallback behavior. (#7493)
This PR is a follow-up to https://github.com/material-components/material-components-ios/pull/7466 to clarify the behavior of the fallback flag.
2019-05-28 14:18:08 -04:00
featherless
ec4b19d064
[Typography] Add mdc_scaledFontForTraitEnvironment. (#7471)
This method's logic exists frequently throughout our componentry and theming extensions as a mechanism for scaling a scalable font with the preferred content size category.

This change introduces a new API that can be invoked by each of the components and theming extensions that support Dynamic Type.

Part of https://github.com/material-components/material-components-ios/issues/7470
2019-05-24 15:19:38 -04:00
featherless
ca11c9b079
[Typography] Copy-edit of UIFont+MaterialScalable.h (#7475)
- `-mdc_scaledFontForSizeCategory:` has been documented as preferred over `-mdc_scaledFontForCurrentSizeCategory` because it encourages use of trait collections and is more testable as a result.
- The method summaries follow the verb form guidance at https://developers.google.com/style/reference-verbs (i.e. "Returns" instead of "Return").
- `mdc_scalingCurve's` property type is now typedef'd so that it can be consistently used throughout the Typography target.
- All of the public API have been copy-edited for clarity and conciseness.

Closes https://github.com/material-components/material-components-ios/issues/7474
2019-05-24 07:06:30 -04:00
featherless
50bd0a4dc5 [Typography] Implement copy semantics on the UIFont's mdc_scalingCurve. (#7476)
Prior to this change, mdc_scalingCurve was implemented using retain semantics insteaad of copy semantics. This potentially enabled a class of surprising bugs if mutable dictionaries were being assigned and then modified after the fact.

After this change, mdc_scalingCurve implements copy semantics as its public API defines.

The added test was verified to fail prior to this PR's change, and passes with the PR's change.

Closes https://github.com/material-components/material-components-ios/issues/7472
2019-05-24 01:58:40 -04:00
Wenyu Zhang
59b8de1254
[Typography] Update Dynamic Type section in Typography doc. (#7469)
Add Dynamic Type doc into Typography as a section.
2019-05-24 00:29:28 -04:00
Wenyu Zhang
14484e4efe
[Typography] add a brief doc for Dynamic Type support. (#7431)
The original README for Typography is not composed by separate files. This PR solely adds a separate file for Dynamic Type section, which needs to be integrated into the root one later.
2019-05-23 23:33:33 -04:00
Wenyu Zhang
a74886b91b
[Typography] Split Typography doc into separate md files. (#7435) 2019-05-21 17:04:19 -04:00
Andrew Overton
c56d5d76d3
Add @objc annotations to get examples to show up in Dragons (#7168)
This is a follow up PR for #7166 adds @objc annotations to Swift catalogMetadata() methods, because the Swift 4 compiler no longer attempts to infer what methods should be visible to Objective-C. As a result of this change in the compiler, no Swift examples were showing up in Dragons after #7166. See this article: https://useyourloaf.com/blog/objc-warnings-upgrading-to-swift-4/ for additional context.
2019-04-17 21:35:43 -04:00
Andrew Overton
b38372192f
Update to Swift 4.2 (#7166)
This PR updates the Swift version to 4.2.

Partially resolves #6874.
2019-04-17 16:59:02 -04:00
ianegordon
96a741b315
[Typography] Add new typography scheme with scalable fonts (#6873)
Adds a new scheme that vends fonts with an associated scaling curve.

This is a BREAKING CHANGE due to a new, required property in the MDCTypographyScheming protocol.
To easily migrate, clients can add the following method to their custom implementations of MDCTypographyScheming.

- (BOOL)mdc_adjustsFontForContentSizeCategory {
  return NO;
}
2019-03-21 17:17:43 -04:00
ianegordon
80db06984b
[Typography] Add Font Scaler (#6871)
MDCFontScalar allows us to add an associated scaling curve to UIFont instances. This scaling curve allows us to support Dynamic Type by creating differently sized fonts based on a UIContentSizeCategory.

MDCFontScaler offers similar, but limited, functionality as UIKit's UIFontMetrics.
2019-03-19 12:22:17 -04:00
ianegordon
861cebe7e1 Revert "[Typography] Dynamic Type 2.0 (#6733)" (#6848)
This reverts commit 648f2499e80a02de28a545a223cc50f00c715097.
2019-03-12 16:36:54 -04:00
Robert Moore
32904609b0
[Typography] Add basic Snapshot tests. (#6828)
Adding Snapshot tests for fonts and opacities.

Closes #6802
2019-03-11 21:36:01 -04:00
ianegordon
648f2499e8
[Typography] Dynamic Type 2.0 (#6733)
Next iteration of our Dynamic Type.

Mimics Apple's new APIs. (UIFontMetrics)
Adds MDCFontScalar to attach curves.
Adds UIFont category to expose fontScaledForCategory methods.
Adds new MDCTypographyScheme with scalable fonts.
Adds sample to demonstrate new curves.
2019-03-08 16:15:24 -05:00
featherless
f17b01c584
Enable -Wunguarded-availability. (#6776)
### Context

By default, Objective-C code will only perform availability checks for iOS APIs introduced from iOS 11 and up. We can enable -Wunguarded-availability to turn on available checks for older SDKs.

Additional context for this behavior comes from [llvm](https://reviews.llvm.org/D34264);

> [This patch](https://reviews.llvm.org/D34264) adds a new warning flag called -Wunguarded-availability-new. If -Wunguarded-availability is off, this warning only warns about uses of APIs that have been introduced in macOS >= 10.13, iOS >= 11, watchOS >= 4 and tvOS >= 11. This warning is on by default. We decided to use this kind of solution as we didn't want to turn on -Wunguarded-availability by default, as we didn't want our users to get warnings about uses of old APIs in their existing projects.

### What's happening in this change

This change turns on -Wunguarded-availability. This has the effect of the compiler performing availability checks for all APIs at or above the current deployment target (iOS 8.0). As such, this PR addresses several instances of code that were not performing availability checks.

Going forward, we will be able to use availability to encode our supported SDKs into the APIs that we provide. For example, we could annotate MDCActivityIndicator with NS_AVAILABLE_IOS(9_0) and all of our code would then have to use runtime checks prior to using this API.

### Caveats

Because -Wunguarded-availability is not enabled by default in Objective-C, our clients will need to proactively enable this flag in order to be warned of any use of APIs that support OS versions < 11.0. We can mitigate this risk in two ways:

1. Clearly announce any changes in our supported OS versions.
2. Encourage clients to enable -Wunguarded-availability.
2019-03-08 10:01:17 -05:00
Yarden Eitan
c4d24627ee
updated jazzy yaml files to include framework root (#6750)
We have had errors when generating the docs using jazzy specifically around components giving a fatal error around not finding imports when depending on other components. This is because each component for jazzy is isolated and on its own unless we provide the framework root. This caused our website generator to crash each time and fail to generate a new website.

This should resolve this problem.

QA=
Before the fix when running the website generator we got these errors:
```
/material-components-ios/components/BottomAppBar/src/MDCBottomAppBarView.h:17:9: fatal error: 'MaterialButtons.h' file not found
building site
building search index
^C/Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge/lexer.rb:458:in `load': Interrupt
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge/lexer.rb:458:in `load_lexer'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:50:in `block in <top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:49:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:49:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/jazzy_markdown.rb:2:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/jazzy_markdown.rb:2:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/doc.rb:7:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/doc.rb:7:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/config.rb:5:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/config.rb:5:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy.rb:1:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy.rb:1:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/bin/jazzy:13:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/bin/jazzy:13:in `<top (required)>'
	from /usr/local/bin/jazzy:22:in `load'
	from /usr/local/bin/jazzy:22:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in `load'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:28:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:463:in `exec'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:27:in `dispatch'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:18:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:30:in `block in <top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:22:in `<top (required)>'
	from /usr/local/bin/bundle:22:in `load'
	from /usr/local/bin/bundle:22:in `<main>'
/material-components-site-generator/scripts/lib/reporter.js:36
      throw e;
      ^

Error: Command failed: bundle exec jazzy         --output "/material-components-site-generator/.stage/ios/catalog/bottomnavigation/api-docs/"         --theme "/material-components-site-generator/ios-api-docs-src/theme"         --head '/components'         --use-safe-filenames
    at checkExecSyncError (child_process.js:601:13)
    at execSync (child_process.js:641:13)
    at JazzyApiGenerator.build (/material-components-site-generator/scripts/lib/jazzy-api-generator.js:34:5)
    at PlatformSite.generateApiDocs (/material-components-site-generator/scripts/lib/platform-site.js:212:17)
    at platformSites.forEach (/material-components-site-generator/scripts/build:86:14)
    at Array.forEach (<anonymous>)
    at reporter.step (/material-components-site-generator/scripts/build:85:21)
    at Reporter.step (/material-components-site-generator/scripts/lib/reporter.js:32:22)
    at Object.<anonymous> (/material-components-site-generator/scripts/build:84:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
```
Now we no longer get fatal errors or crash when running the script.
2019-03-01 16:52:02 -05:00
Joe Aguilar
fc7f30d012 [Catalog] Completed audit of swift forced unwrapping in catalog (#6186)
This work closes #3984.

This change audits the rest of the catalog swift examples force unwrapping. I had begun this process with PR #6117.
2019-02-06 11:01:48 -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
Cody Weaver
cd3504e23b
[Typography] Add examples to BUILD file (#6403)
Closes #6234
2019-01-17 08:56:32 -05:00
Yarden Eitan
2803125b2c
ran clang-format (#6027) 2019-01-11 13:23:51 -05:00
featherless
003cf8bcd9
[automated] Make mdc_unit_test_suite's name explicit. (#6080)
This change was automatically generated by running a find replace of the following strings:

```
mdc_unit_test_suite(

mdc_unit_test_suite(
    name = "unit_tests",
```

And then running buildifier to enforce style:

    find . -name BUILD | xargs ~/buildifier
2018-12-20 12:36:05 -05:00
featherless
dae4e37ea5
[automated] Ran buildifier against all BUILD files. (#5999)
This is an automated change generated by running the following command:

    find . -name BUILD | xargs buildifier

buildifier can be installed from https://github.com/bazelbuild/buildtools

This change formats all of our BUILD files with the buildifier formatter in preparation for us having a BUILD format linter as part of our presubmits and so that we can cleanly run buildozer commands against the codebase.
2018-12-13 11:20:12 -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
Robert Moore
74a27253e8
Global replace of integral single-precision literals with integer literals. (#5709)
Global replace of integral single-precision literals with integer literals.

Regular expression used:
```perl
/[^\w]([0-9]+)\.[0]*[fF]/$1/
```
2018-11-08 14:02:04 -05:00
Robert Moore
64d6535f2a
[Typography] Cache standard font for text style. (#5533)
Scrolling the `MDCSelfSizingStereoCell` while using the Time Profiler showed that `+[UIFont mdc_standardFontForMaterialTextStyle:]` was consuming about 11% (iPhone 4S) of the used CPU time.  

Because the `UIFont` returned for a specific `MDCFontTextStyle` should always be the same (they are created with exactly the same `UIFontDescriptor` values), the font can be cached using the `MDCFontTextStyle` as a key. This nearly eliminates any time required for these font retrievals (excepting the first call), and increased CPU time dedicated to the main thread by 8% (iPhone 4S). 

Reduces time spent loading fonts when scrolling Collection Cells: 11% on iPhone 4S/iOS 9.3.6, 2% on iPhone 5c/iOS 10.3.3

||Original|Cached|
|--|--|--|
|iPhone 4S/iOS 9.3.5|![typography-original](https://user-images.githubusercontent.com/1753199/47525482-60af4680-d86b-11e8-8995-bd13914385da.png)|![typography-cached](https://user-images.githubusercontent.com/1753199/47525491-64db6400-d86b-11e8-9850-98e114c60724.png)|
|iPhone 5c/iOS 10.3.3|![typo-orig-min-5c](https://user-images.githubusercontent.com/1753199/47526162-f1d2ed00-d86c-11e8-9b53-6d6b018d433f.png)|![typo-cached-min-5c](https://user-images.githubusercontent.com/1753199/47526168-f5ff0a80-d86c-11e8-8061-48375b255817.png)|
2018-11-06 08:43:22 -05:00
featherless
d5c064fdff
[automated] Fix more copyright stanzas. (#4990)
Our creativity knows no bounds.

### Find

```
/\*
 *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 ([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 ([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 ([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\.
 \*/
```

### Replace

```
// 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 16:09:12 -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
Jeff Verkoeyen
9854044c96 Revert "[automated] Standardize our open source license stanza to what Xcode generates. (#4982)"
This reverts commit b45bc2fdd4dfe12fc76751a45c9cf7b0d6c1261f.
2018-08-31 12:01:24 -04:00
featherless
b45bc2fdd4
[automated] Standardize our open source license stanza to what Xcode generates. (#4982)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on https://github.com/material-components/material-components-ios/pull/4478 to generate the correct stanza for us instead.

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

### Find

```
/\*
 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\.
 \*/
```

### Replace

```
// 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 11:49:00 -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
featherless
bbe4a23fe0
Remove all __IPHONE_11_0 checks now that we no longer support Xcode 8. (#4915)
We can now make use of @available throughout our codebase.

We support Xcode 9 and up, which includes the iOS 11 SDK. This means we can remove any guards for SDKs prior to iOS 11.

This was cleaned up by running a global find-and-replace with the following regular expression:

```
Find:#if defined\(__IPHONE_11_0\) && \(__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\)\n(.+if \(@available\(iOS 11.0, \*\)\) \{(?:.|\n)*?)(?:#else(?:.|\n)*?)?\n#endif
Replace:$1
```

With some additional cleanup for stragglers that didn't match this pattern. Note that else clauses were intentionally dropped.

Closes https://github.com/material-components/material-components-ios/issues/4909
2018-08-28 09:57:30 -04:00
Will Larche
53876c3dca
[Typography] 3rd PR on font equality (#4435)
* [TextFields] Adding todos for #4331

* [TextFields] Creating simple equality files.

* [TextFields] Prevents fonts that are almost the same but not quite from messing up the rendering.

* [Typography] Adding tests for font equality.

* [TextFields] Formatting.

* [Typography] Adding Math to the bazel file.

* [Typography] PR feedback.

* [Typography] PR feedback.

* [Typography] Comment.

* [Typography] PR feedback.

* [Typography] PR feedback.

* [Typography] Updating podspec.

* [Typography] Asserts for bazel.

* [Typography] Logging for tests.

* [Typography] Loggin.g

* [Typography] Removing logging and the deeper check.

* [Typography] Making simple equality a category.

* [TextFields] Using new method.
2018-06-26 11:45:13 -07:00
Yarden Eitan
7cf1050222 remove file that wasn't removed from revert 2018-06-07 11:23:19 -04:00