54 Commits

Author SHA1 Message Date
Randall Li
502bc5d910 Ran a Swift formatter
PiperOrigin-RevId: 395947664
2021-09-10 09:48:14 -07:00
Jeff Verkoeyen
1c14fb5e7b Internal change.
PiperOrigin-RevId: 363294413
2021-03-16 16:23:36 -07:00
Jeff Verkoeyen
29803522c6 Optimizing imports
PiperOrigin-RevId: 357185525
2021-02-12 07:27:05 -08:00
Jeff Verkoeyen
39c20e15f8 Optimizing imports
PiperOrigin-RevId: 356967514
2021-02-11 07:17:45 -08:00
Bryan Oltman
da4b8f7c7f Fix mdc_elevationDidChangeBlock block parameter types for Xcode 12
PiperOrigin-RevId: 331843566
2020-09-15 13:39:15 -07:00
Randall Li
b677a3629e
[Material][Availability] Migrates cards to MDCAvailability. (#9728)
[Material][Availability] Migrates cards to MDCAvailability.
2020-02-14 15:15:09 -05:00
Bryan Oltman
f44e5d679d
[Cards] Delete Themer classes (#9197)
Deletes the deprecated Card shape and color themers. These files were removed from .podspec and BUILD files in https://github.com/material-components/material-components-ios/pull/9141

Fixes #9098
Fixes #9097
Fixes #9096
Fixes #9095
2019-12-09 12:41:31 -05:00
Bryan Oltman
4e41462438
[Cards] Migrate MDCCardsColorThemer to theming extensions (#9141)
Migrating Cards Themer code to theming extensions as part of the deprecation and deletion of `MDCCardsColorThemer`.

Part of #9098, #9097, #9096, and #9095
2019-12-06 10:24:00 -05:00
Yarden Eitan
130289a6d4
[Cards] CardCell Supports MaterialElevation. (#8079)
Adds conformance to MDCElevatable and MDCElevationOverriding for card cell.

Part of #8022
2019-07-24 17:18:25 -04:00
Yarden Eitan
f2b12a10ed
[Cards] MDCCard conforms to MDCElevation and MDCElevationOverride (#8054)
Adds support for the MDCElevation and MDCElevationOverride protocols.
2019-07-24 16:13:32 -04:00
Cody Weaver
bda9d92cac
[Cards] Add traitCollectionDidChange block to MDCCardCollectionCell (#8007)
Adds a traitCollectionDidChangeBlock to MDCCardCollectionCell, called when its trait collection changes.
2019-07-23 11:29:05 -07:00
Cody Weaver
acd2827f2b
[Cards] Add traitCollectionDidChange block to MDCCard (#8006)
Adds a traitCollectionDidChangeBlock to MDCCard, called when its trait collection changes.

Related to #7953
2019-07-23 09:44:44 -07:00
Andrew Overton
f25c85abd7
[Cards] Add Cards dynamic color support (#7906)
This PR makes it so that MDCCard calls updateShadowColor, updateBorderColor, and UpdateBackgroundColor in layoutSubviews. It also adds a snapshot test.
Closes #7878.
2019-07-17 01:22:11 -04:00
Wenyu Zhang
9aa1d72bc7
[Cards] Move Cards theming extension to ready. (#7178)
closes https://github.com/material-components/material-components-ios/issues/7165
2019-04-19 11:36:20 -04:00
Yarden Eitan
5bed3961e6
[ContainerScheme] Graduate ContainerScheme to ready. (#7170)
This PR graduates ContainerScheme to ready.

This includes updating the podspecs, podfile, all the import statements related to ContainerScheme, updating .kokoro rewrite rules, and finally the readme to not have ContainerScheme regarded to as being in beta.

Ran locally kokoro with -b bazel successfully.

Resolves #6732
2019-04-18 09:25:02 -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
Andrew Overton
419d0cc9ca
[Cocoapods] Fixing Snapshot Tests (#6618)
Initially this PR was supposed to consist of a revert of #6619 (which reverted #6611) with some small tweaks to fix whatever was wrong in #6611. It turned into something else! I had a hard time figuring out a way to both run MDCDragons/MDCCatalog with ⌘R _and_ run snapshot tests within either of the two apps' schemes. The only way I was able to manage it was by abandoning our convention for podspecs (only for snapshot tests), which relies heavily on nested subspecs and test_specs. In its place, I wrote a probably not very idiomatic ruby module that aims to allow for all snapshot testing source files to funnel into a single unit test target but still give us some flexibility in how we configure snapshot tests on a per component basis.

Closes #6700.
2019-02-22 10:17:30 -05:00
Andrew Overton
3b1d82a526
Revert "[Cocoapods] Fix snapshot testing after Cocoapods 1.6.0 update (#6611)" (#6619)
This reverts commit fb21536d9f685485793de87f25ad2d4cd43e081e.
2019-02-14 19:22:03 -05:00
Andrew Overton
fb21536d9f
[Cocoapods] Fix snapshot testing after Cocoapods 1.6.0 update (#6611)
Snapshot tests stopped running after https://github.com/material-components/material-components-ios/pull/6580. I think this PR fixes it.

Cocoapods 1.6.0 creates a selected "white lego" test target for each unit test `test_spec` in a podspec. However, it did not do so for our snapshot tests. Instead, it created a single unselectable  `MaterialComponentSnapshotTests` build target with the red and white target icon.

I moved the snapshot testing related files like `MaterialSnapshot.h` to a regular `subspec`, as opposed to a `test_spec`. After this change, Cocoapods 1.6.0 created selected "white lego" snapshot testing targets, just like with the unit tests. I guess it's bad to have test_specs within subspecs that don't have any source files?

EDIT: What I described above was only the beginning. I had to do a lot more to get everything working. Because Cocoapods 1.6.0 makes each `test_spec` into its own test target I had to create additional Swift dummy files to evade the [-lswiftSwiftOnoneSupport](https://github.com/material-components/material-components-ios/blob/develop/components/Cards/tests/snapshot/Dummy.swift#L17) linker error that Rami discovered when first adding Snapshot testing. I also had to add these Swift files to BUILD files. We might be able to get rid of these if we only depend on `iOSSnapshotTestCase/Core` (which is the same thing as `iOSSnapshotTestCase` but without Swift support) and commit to writing only Obj-C snapshot tests.

I also had to add two Objective-C dummy source files at the top level of the `MaterialComponentsSnapshotTests` podspec, and to the `private/Snapshot` BUILD file. I don't know why these source files were required. I arrived at this after much trial and error, which is not ideal. I want to try to get rid of them if possible, but I think they should go in for now, just so we can get this stuff working again.

Lastly, I had to disable bitcode everywhere. For some reason, the fact that `iOSSnapshotTestCase` explicitly disables bitcode is now a problem for us, where it wasn't before. From what I read on various blog posts, if an app target's dependency explicitly disables bitcode, an app target cannot enable it. Again, I don't know why this is only now a problem. This change on my part is the result of reading linker error messages and taking their advice. Right now I'm just disabling it everywhere in the `post_install`. We might be able to get away with only disabling it in MDCDragons and MDCDragons and just committing that to version control. I plan to look into that after this gets merged in.

I'm hoping that some of the changes in this PR can be undone at a later date, preferably soon. There is a chance that only depending on `iOSSnapshotTestCase/Core` and removing our snapshot tests from the Dragons and Catalog schemes and putting them in their own app target _could_ go a long way towards doing this.

Closes #6609
2019-02-14 14:07:40 -05:00
Robert Moore
46ff9c3173
{kokoro} Fix develop (#6575)
Fixes the `develop` branch by:
* Pinning kokoro to CocoaPods 1.5.3
* Restoring missing imports causing bazel builds to fail.

Closes #6574
Related to #6356
2019-02-08 12:24:55 -05:00
Ian Gordon
e61e89a592 Fix podspec validation issues 2019-02-07 16:31:09 -05:00
Yarden Eitan
eb98acd604
[Cards] Fix elevation values for Highlighted and Selected for Cards in themer. (#6485)
Our current highlighted and selected elevation values for cards and card cells should be 1 point rather than 4.

closes: b/123236251 and b/123434660
2019-01-28 13:38:32 -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
Andrew Overton
056e4701f0
Make pod install work on Cocoapods 1.6.0.beta.2 (#5966)
# Original PR description:

On Cocoapods version 1.6.0 beta 2 we get an error on pod install because certain test targets don't have any sources to compile. This PR adds some skeleton unit test source files to get that working. Is everyone okay with these (for now) basically empty files?

Closes #5825

# FInal PR description:

The original aim of this PR was to get the project working with the Cocoapods 1.6 beta.

I initially didn't know where to begin getting it to work, so I used `pod lib lint` to get answers. `pod lib lint` had issues with the following things:

1. test_specs not having any sources to compile. This was due to our pattern of putting unit test test_specs inside of parent test_specs that didn't have anything else.

To address this I did two things. First, I moved away from the nested test_spec pattern. Now, instead of "Subspec/tests/unit_tests" it's "Subspec/UnitTests". This is more in line with the style Cocoapods uses [here](http://blog.cocoapods.org/CocoaPods-1.6.0-beta/). Secondly, I added some dummy files for things like UIMetrics and MaterialMath.

2. Importing headers across modules without using framework style imports.

I added framework style imports. This required some additional rewrite rules in the kokoro script.

3. Dependencies across subspecs being implicit.

I made them explicit by adding dependency statements to the podspecs where needed. 

`pod lib lint` didn't take issue with this, but I also saw that `MaterialComponents` was depending on `MaterialComponentsBeta` in various places. For example, all the theming extensions were in beta, but the tests for them weren't. I moved the tests to test_specs within the beta extensions. This required some directory structure changes. These changes then required some BUILD file changes. Making BUILD file changes made me realize that some swift unit tests weren't being accounted for by bazel. I took care of this too.

This PR also fixes some swift debugging stuff--"po" statements that weren't working before now do. I didn't rigorously verify this, but I also think this PR will lead to faster clean build times? It kinda seemed like it was while I was working on it.
2019-01-11 10:08:05 -05:00
rami-a
653cedde4a
[Cards, Textfields] Update snapshot tests to utilize the new API for adding a background view (#6065)
### Changes
With the addition of #6057 we now have a category with an improved API to add a background view to the view you wish to snapshot. This change migrates the existing snapshot tests to this new API and removes the old one.

### Bugs
Closes #5942
2018-12-20 09:30:17 -05:00
rami-a
8dcac3ab16
[Snapshots] Add support to specify insets for snapshot tests (#6057)
### The Problem
The current infrastructure for snapshot tests assumes the developer wants to embed their view with 10 points of padding on all sides but this won't always be the case.

### The Solution
Create a UIView category to handle adding the background view and additionally expose an API in the snapshot base class to optionally allow the developer to specify their own custom insets like so:

```objc
[self mdc_addBackgroundViewWithInsets:UIEdgeInsetsMake(10, 10, 10, 10)]
```

A follow-up PR will move our snapshot tests over to this new category.

### Bugs
Part of #5942
2018-12-19 15:01:43 -05:00
rami-a
e25d7c88ca
[Cards] Fix shadow elevation values for outlined cards (#6050)
### Context
After adding snapshot tests for Cards, we noticed that the outlined variant had elevation when it was not supposed to.

### The problem
Cards shadow elevation values were not correct

### The fix
Update the values, update the unit tests, and update the snapshot goldens.

### Related bugs
Closes #6045
2018-12-19 14:11:15 -05:00
rami-a
58db37d09d
[Cards] Cards theming extension + snapshots: Re-revert with fix (#6049)
This is a re-revert of #6048 that includes a missing import statement that was causing bazel to fail.

This re-reverts #6033 and #6041 

Closes #6030 
Closes #5493 

The missing import is in `EditReorderCollectionViewController.swift` for `MaterialContainerScheme`
2018-12-18 16:24:54 -05:00
Robert Moore
63a0435070
[Cards] Revert cards theming exstension (#6048)
Cherry-picks the Theming extension revert from the `release-candidate` branch and reverts the Snapshot testing changes that used the Theming extensions.

Reopens #6030 
Reopens #5493
2018-12-18 15:25:01 -05:00
rami-a
fd8476e196
[Cards] Add snapshot tests for Card component with variations (#6041)
### Context
Since adding the ability to do snapshot tests, we want to increase our snapshot test coverage.

### The problem
We currently do not have snapshot tests that for cards

### The fix
* Add snapshot tests for MDCCard in unthemed, baseline themed, and outlined themed
* Add snapshot tests for MDCCardCollectionCell in unthemed, baseline themed, and outlined themed

### Bug
Closes #5493
2018-12-18 13:46:05 -05:00
rami-a
fdaf872c60
[Cards] Add theming extension for Cards component (#6033)
### Context
As the team pivots to using theming within extensions we continue this work with Cards.

### The problem
We currently do not theme cards using a theming extension

### The fix
* Add theming extension for MDCCard and MDCCardCollectionCell
* Write unit tests for new extension
* Update existing examples to utilize the extension

### Bug
Closes #6030 

### Screenshots
Everything should be exactly the same visually.

| Before | After |
| - | - |
|![simulator screen shot - iphone 7 - 2018-12-17 at 13 59 52](https://user-images.githubusercontent.com/2364772/50110092-65f39680-0207-11e9-9a32-02161f7b2df4.png)|![simulator screen shot - iphone 7 - 2018-12-17 at 14 01 51](https://user-images.githubusercontent.com/2364772/50110130-7dcb1a80-0207-11e9-83d9-53bc98ad374b.png)|
2018-12-18 09:38:37 -05:00
Robert Moore
5b4c5e5272
[Snapshot] Move verification into test methods (#5947)
Instead of implicitly verifying the snapshotted view in the test class
`-tearDown` method, it is clearer to readers if each test explicitly
performs the verification.

Closes #5941
2018-12-07 13:14:40 -05:00
rami-a
7ff5daf101
[Snapshot] Tweak snapshot test base class to handle the verify in tearDown (#5933)
This change simplifies the way a developer would have to write a snapshot test. The logic to verify the view is in the tearDown and will enforce the developer to write the test correctly.
2018-12-06 13:28:54 -05:00
rami-a
615a0e4061
Snapshot Testing Proof of Concept (#5887)
* Snapshot Testing Proof of Concept (#5754)

### The problem
We currently do not have UI tests on a component level. Integrating snapshot tests would allow us to have peace of mind with each PR that it isn't going to introduce any changes to the UI unless its intended to.

### The solution
* Integrate `ios-snapshot-test-case` pod to handle generating and diffing images of components. 
* Integrate `git-lfs` to handle storage of the goldens.

This PR creates one test to showcase the ability to do snapshot tests. Upon merging this PR, you must install git-lfs in order to properly have the images pulled down. The 3 steps to do this:
1. `brew install git-lfs`
2. `git lfs install`
3. `git lfs pull`

Additionally, the golden is generated using an iOS 11 simulator at 2x scale so that the kokoro jobs are happy.

### Related bugs
Closes #5740

### Difference from #5754 
**Note:** This is a re-revert of #5754 that aims to fix issues with Travis CI by ensuring the snapshot test only runs on a single iOS version. I've opened #5888 to expand on this in the future. A few things changed in the approach in this PR:
 * We only run the snapshot test for iOS 11.2.0 until we can have an elegant solution for supporting multiple OS''s (see #5888)
 * The snapshot tests now live in their own test target to avoid issues with having to require an App host for all tests.
* Additionally, a dummy swift file was required for compilation of this new test target (see https://forums.developer.apple.com/thread/88451 for context)
2018-12-05 09:49:41 -05:00
Robert Moore
13781e6d45
[Catalog] Revert "Snapshot Testing Proof of Concept" (#5883)
Reverts material-components/material-components-ios#5754

Travis CI on `develop` branch testing has failed since snapshot testing was introduced. Rolling it back.

https://travis-ci.org/material-components/material-components-ios/builds
2018-11-30 09:20:03 -05:00
rami-a
c6a300ff2c
Snapshot Testing Proof of Concept (#5754)
### The problem
We currently do not have UI tests on a component level. Integrating snapshot tests would allow us to have peace of mind with each PR that it isn't going to introduce any changes to the UI unless its intended to.

### The solution
* Integrate `ios-snapshot-test-case` pod to handle generating and diffing images of components. 
* Integrate `git-lfs` to handle storage of the goldens.

This PR creates one test to showcase the ability to do snapshot tests. Upon merging this PR, you must install git-lfs in order to properly have the images pulled down. The 3 steps to do this:
1. `brew install git-lfs`
2. `git lfs install`
3. `git lfs pull`

Additionally, the golden is generated using an iOS 11 simulator at 2x scale so that the kokoro jobs are happy.

### Related bugs
Closes #5740
2018-11-29 15:56:06 -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
675235ed05
{Tests} Deallocate test objects at the end of tests. (#5397)
Deallocating many of the properties created for each unit test. Since all
XCTestCase instances survive until the end of the test suite, any properties
created for a test will be preserved as well. This frees up around 3.7 MB
(~6%) of memory from the entire test suite, as measured on my desktop.

|Before|After|
|----|----|
|![test-objcs-before](https://user-images.githubusercontent.com/1753199/46813473-c3b9bd00-cd44-11e8-990c-28dff4ab5ad2.png)|![test-objcs-after](https://user-images.githubusercontent.com/1753199/46813481-c7e5da80-cd44-11e8-90e4-2e6d532ebbfb.png)|

See also: https://qualitycoding.org/xctestcase-teardown/

Closes #5395
2018-10-12 08:33:58 -04:00
Yarden Eitan
bfc674a631
[Shape]! Terminology updates to the Shape Scheme (#5247)
**<><>This is a breaking change<><>**

There are slight terminology updates to the current Shape Scheme. 

First, we are staying with the Cut notion for cut corners rather than Angled. This is on par with our current naming of the CutCornerTreatment.

Secondly, we are moving from the term S/M/L Surface to S/M/L Component for the scheme categories.
2018-09-26 13:01:08 -04:00
Yarden Eitan
c741ba4904
[Shape]! Provide more granularity for corner setting for the theming (#5116)
This PR allows our users to set specific corners in the shape scheme and have it applied correctly to the components.

Some components may allow only some of their corners to be set (i.e., BottomSheet)
2018-09-13 15:24:29 -04:00
Yarden Eitan
75ddb21ed0
[Shapes] merge MDCShapeCorner and MDCCornerTreatment into one (#5090)
This will allow us to set percentage support for a corner treatment as a follow up PR. Reason being is that the MDCCornerTreatment is part of the shape of the component itself, and hence has control to set the value of the corner when it is right in the lifecycle and the frame has been set. If we keep the percentage value setting in the Shape Themer, then the themer could be applied too early in the lifecycle and thus take a percentage off a 0 value (frame height).

Overall this simplifies the API and causes less duplication.

The other approach would be to *also* add percentage support to MDCCornerTreatment and leave MDCShapeCorner as is, but that would just make it too cumbersome and redundant.
2018-09-11 17:01:58 -04:00
Yarden Eitan
c036e22a7d
[Cards]! Add a card shape themer (#5031)
Added a card shape themer to our cards component. This includes adding a shape themer, and adding that to the card themer logic to apply the shape themer as well. Also added unit tests.

This PR is blocked on PR #5030
2018-09-07 11:01:21 -04: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
featherless
0b26db8766
[Cards] Remove NSCoding support. (#4548)
Closes https://github.com/material-components/material-components-ios/issues/3937
2018-07-13 12:51:55 -04:00
Yarden Eitan
27a6c46fc3
[Cards] Added interactability toggle to Cards (#4404)
After a discussion with design we have concluded that a card as a whole doesn't need to be interactable as long as there are other interactable components in its content. As an example, a card that has a button can remove its interactability and allow the button to operate as the interactable entity.

This PR includes:

addition of the isInteractable boolean for MDCCard and MDCCardCollectionCell.
Update to our Card examples to show this change.
Update unit tests for Cards to test the new property.
Small fix to the card example.
This unblocks #4261
2018-06-26 16:39:40 -04:00
featherless
a132eb2106
[Cards] Add umbrella headers for all extension targets. (#3463)
Also updated all imports to make use of the umbrella headers.

Pivotal story: https://www.pivotaltracker.com/story/show/157045283
2018-04-24 16:16:06 -04:00
Yarden Eitan
bd8760b94b [Cards] Implement a semantic color scheme color themer API. (#3289)
Addition of unit tests, and updated the examples to use the new themer.

Pivotal: https://www.pivotaltracker.com/story/show/156169708

[Delivers #156169708]

![simulator screen shot - iphone 8 - 2018-04-08 at 17 44 18](https://user-images.githubusercontent.com/4066863/38468869-9acec11a-3b54-11e8-9e99-af9773ab73bd.png)
2018-04-13 08:42:59 -04:00
Yarden Eitan
bafdbf325c
[Cards] Added customization of image, image alignment, and image tint for each state. (#3030)
* added customizable alignment of selectable image for state, customizable tint color for state, and customizable selectable image for state

* added vertical alignment and fixed copy

* tint color update

* Update MDCCardCollectionCell.h
2018-03-05 18:11:05 -05:00
Yarden Eitan
de988cfe59 [Cards] updates to unit tests and minor fixes (#2898)
* updates to unit tests and small fixes

* update tests

* CGFloat explicit conversion
2018-02-05 17:07:32 -05:00