We recommend using `initWithDefaults` and we should follow the recommendation. This change removes all usage of `init` within MDC components in order to let us remove that initializer from the public surface.
PiperOrigin-RevId: 302958447
We need to add @objc annotations to colorScheme and typographyScheme instances in our Swift examples, because we moved to Swift 4.2, the respondsToSelector won't find `setColorScheme:` and `setTypographyScheme:` setters otherwise.
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.
```
Many of our Swift examples are either missing imports or are importing all of
MaterialComponents. Both of these will cause failures during internal builds.
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
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
* [TextFields] Linting
* [Catalog] Swift style.
* [Catalog] Swift style.
* [Buttons] Swift style.
* [FlexibleHeader] Swift style.
* [NavBar] Swift style.
* [Snackbar] Swift style.
* [Tabs] Swift style.
* Replace MDC all icons
* Update border
* Replace MDCActionExtension icon with new logo
* Update all headers to be white on black
* Make Catalog greyscale to match Material’s style.
* Fix collection tile
* Update all headers to be white on black
* Make Catalog greyscale to match Material’s style.
* Fix collection tile
* WIP: Updating TabBar example to use black/green theme.
* WIP: Monochoroming all examples.
* Switch MDC Catalog to a black and white theme (#1355)
* Replace MDC all icons
* Update border
* Replace MDCActionExtension icon with new logo
* Update all headers to be white on black
* Make Catalog greyscale to match Material’s style.
* Fix collection tile
* Update all headers to be white on black
* Make Catalog greyscale to match Material’s style.
* Fix collection tile
* Fix floats
* Make Catalog greyscale to match Material’s style.
* More black and whiting
* WIP: Snackbar and global style
* Simplify snack bar examples.
* Page control
* Integrate SwiftLint in the Catalog.
* Update the disabled SwiftLint rules.
* Reference a local swiftlint.yml symlink.
This prevents us from getting warnings about code style violations from the other demos.
* Fix SwiftLint violations in the Catalog and Components.
* Ignore the `third_party` directory when running the linter.
We should not have to deal with warnings in code we may not be able to fix easily.
* Integrate SwiftLint into Shrine.
Additionally, fix a number of warnings introduced.
* Run SwiftLint on Travis.
* Enable many of the previously disabled rules and correct them.
* Fix control statement violations from SwiftLint.
* WIP
* WIP
* Simplified build script and fixed it to build all schemes.
* WIP
* Renamed script to build_all and added better output.
* Add scripts/list_xcode_workspaces.
* Filtered out the CocoaPods schemes.
* Use Xcode to update Swift to v3.
* Updated tracked touches map from NSNumber to Int.
* Fixed button sorting that was not actually sorting.
* targetContentOffset no longer allowed to be nil.
* "Fixed" failing test by reducing random number range?
* Swift 3 syntax change.
* Swift 3 syntax change.
* Removed invalid center-aligning tests.
Fixed default nav bar alignment test.
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...
Summary:
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.
Changed copyright statement to include non-Google authors.
Command run:
find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'
Added non-source files.
Command run:
grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'
Reviewers: featherless, O1 Material components iOS, randallli
Reviewed By: O1 Material components iOS, randallli
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1415