Also aligned the examples to consistently make use of properties instead of ivars.
ivar -> property replacement done using the following regexp:
- Find: `_(\w+)`
- Replace: `self.$1`
Cleaned up the following examples:
- ChipsActionExampleViewController
- ChipsChoiceExampleViewController
- ChipsCustomizedExampleViewController
- ChipsInputExampleViewController
- ChipsSizingExampleViewController
- ChipsShapingExampleViewController
Polish as part of https://github.com/material-components/material-components-ios/issues/8459
This PR adds a container scheme property to the chips examples that didn't have them.
It also uses the theming extension to theme chips that weren't already being themed with it.
Closes#6439.
### Context
As the team pivots to using theming within extensions we continue this work with Chips.
### The problem
We currently do not utilize the theming extension for chips examples
### The fix
* This change updates all the chips examples to use the new chips theming extension.
* Additionally, this updates the shape example to use the new chips theming extension.
### Bug
Closes#6083
{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\]'
This is a follow up PR for #5111 and #5112 and relies on both.
This integrates the created shape themer for chips into the examples that currently use color/typography themers.
This closes#5048
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.
```
Chips are small and so need support for custom touch target sizes. Following
the lead of MDCButton, a new property, `-hitAreaInsets` is added that clients
can use to support larger touch targets.
Closes#3513
Internal issue b/77728916
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
* Chips: Color Themer is added. Podspec and Build file updated.
Proper Color Mapping, testing and example update is left to do.
* Adding a helper to merge two colors with different opacities.
* define nonnull for interface.
* [Chips] Color Themer Implementation.
Color themer fully implemented.
Tests are added.
Examples are added.
* tests for color merge functionality.
* Name change "merge" -> "blend"
full support for blending with any opacity.
More tests added.
Better Documentation.
* updating API name.
* ColorBlend:
Change the type to CGFloat from Double,
Updated Documentation and tests.
* All different type of chips have the same mapping for color themer. So the break down between different types is not needed. Just stroked and regular type.
* separate the method implementation out since now there are only two varients.
* [Chips] Chip field
* Clean up example
* Nits
* [self invalidateIntrinsicContentSize];
* Reorder addChip behavior
* Use correct version check
* NSCoding
* Fix example
* 32dp
* Remove k prefix
* Constrain width of chips