{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\]'
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.
```
Users should be able to override the default `accessibilityHint` on the
title text of the Feature Highlight view. The current hint is incorrect
instructions about dismissing the view.
Since we are not currently making breaking changes to components, this
change will permit teams to override the incorrect hint by assigning
either an empty string (to have no hint) or to set an appropriate hint.
Partially implements #3644
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
* Adding TypographyThemer for FeatureHighlight.
* finish the deprecation comment.
* fix blaze build
* Typography -> TypographyThemer
* Updated old tests.
* Cleaning up comments, and test.
* use an instead of a for MDC
* Added Semantic Color Scheme Method for FeatureHighlight.
* change the applied color for title and body.
* Added Color Scheme for Feature Highlight.
* [Color] Implement a swift-friendly API for color scheme defaults. (#3246)
The old API required swift code like so:
MDCSemanticColorScheme(materialDefaults: ())
The new API allows swift code like so:
MDCSemanticColorScheme(defaults: .material)
Pivotal story: https://www.pivotaltracker.com/story/show/156527002
Many internal clients are breaking because of this API change. Instead, we
should follow the deprecation policy so clients can make a gradual migration
to the final API.
This reverts commit 24be789f57aedb732ceddecc36699f52875dc8d6.
Reopens#3144
* Extracting Accessibility out of FeatureHighlightViewController to a mutator.
Tests added.
Example updated.
* Revert "Extracting Accessibility out of FeatureHighlightViewController to a mutator."
This reverts commit 0b5433ebf86366087b240c4dc4992a0603fa73e0.
* Feature Highlight Clean up.
* Update examples.
* make title and body font defaults a class property.
* Extracting Accessibility out of FeatureHighlightViewController to a mutator.
Tests added.
Example updated.
* Added the new folder to pod setting.
* Splitting Title and Body Mutators, added tests for case of nil color.
* extra lf.
* Options is now a variable that can be given to the mutator.
* Fixing unit test issues, Updating all examples.
* Fixing Build file.
* Fixing build file.
* build file fix
* extra pace in the build file
* Revert "extra pace in the build file"
This reverts commit 18195fc893da2bcef7f8ef21f20b9f016b6c6011.
* extra space.
* cleaning up based on PR feedback.
* call super on setup and teardown.
* has to include to folder.
* build file indentation and variable name fixes.
* added color test.
* Document the test
* Made single method for accessibility.
* removing option input from public API.
* improving tests and documentation.
* putting this change in a separate PR.
* [TextFields] Beginning to update the docs to show the new controller styles.
* [TextFields] Correcting the name of a file.
* [TextFields] Adding content to controller styles doc.
* [TextFields] Images for the text field styles doc.
* [TextFields] Renaming styling doc.
* [TextFields] Moving doc images.
* [TextFields] Updating image ref paths.
* [TextFields] Text clarity in doc.
* [TextFields] Updated photo.
* [TextFields] Nits of grammar.
* [TextFields] Spelling correction.
Discussed merge with Ian offline. Issues with Travis CI may be resolved once the PR is merged.
* Add color to tiles.
* Add theming to catalog
* Update text field tile.
* Implementation method signatures should match those in header.
* Update MDCDrawFunc typedef
* Pass color scheme through NSNotification
* Add component theming
* Add tabbar themer
* Update tab example to use UIAppearance
* Theme sliders based on UIAppearance proxy
* Allow any class conforming to MDCColorScheme
* Override navigation bar color theme for imagery example.
* Update AppBar and ButtonBar color theming
* Update button bar themer comment
* Update button theming
* Remove theme imports where not necessary.
* Fix case of private
* Update feature highlight
* Move feature highlight view implementation details into private.
* Move feature highlight view implementation into private
* Move feature highlight properties into private. Fix space formatting.
* Fix formatting
* Clean up comments, formatting.
* Change property order
* Use year of when file was first created.
* Add feature highlight view to umbrella header
* Make MDCFeatureHighlightView public and update color setters for use with UIAppearance
* Change featureHighlightView to nonnull, fix formatting
* Update comment
* 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
* API Review for Feature Highlight component
Summary:
This is the proposed API for the Feature Highlight component.
For more info see the following links:
Design spec: https://material.googleplex.com/growth-communications/feature-discovery.html#feature-discovery-design
Tracking bug: b/30695049
Example usage
```
MDCFeatureHighlightViewController *vc = [[MDCFeatureHighlightViewController alloc] init];
vc.delegate = self;
vc.hintTitleText = @"...";
vc.hintBodyText = @"...";
[vc highlightView:_button];
[self presentViewController:vc animated:animated completion:completion];
```
In the delegate:
```
- (void)featureHighlightWasAccepted:(MDCFeatureHighlightViewController *)highlight {
// do accepted things here
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)featureHighlightWasIgnored:(MDCFeatureHighlightViewController *)highlight {
// do ignored things here
[self dismissViewControllerAnimated:YES completion:nil];
}
```
Reviewers: ajsecord, featherless, iangordon, O1 Material components iOS, randallli
Reviewed By: ajsecord, featherless, iangordon
Subscribers: randallli, iangordon, featherless, ajsecord
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1465
* Add MDCFeatureHighlightViewController
* Add Feature Highlight typical use
* Get Feature Highlight buildable
* Copy functionality over from prototype
* Accept/Reject highlight with animation
* Rotation
* Tap anywhere in the feature highlight typical use case demo to move the button
* Align highlight center and highlight point
* Layout text correctly
* Use sample text
* Use animated transitioning delegate for presentation and dismissal animations
* Clean up presentation + dismissal animation code
* Move intructional text behind button
* Limit width of text in feature highlight
* Layout text relative to center when noncentered
* Fix rotation
* First pass at feature highlight color example
* Properly map the inner and outer colors to the view
* Use correct license header
* Automatically choose text color based on outer highlight color
* Clean up color usage
* wrap long lines
* Clean up title positioning
* Clean up radius calculation
* Constize values
* Add feature highlight nav bar example
* Move examples up a directory
* Remove nav bar example
* Improve outer highlight color docs and implementation
* Add TODO: Mask the labels during the presentation and dismissal animations.
* Clean up feature highlight view
* Clean up feature highlight examples
* Layout feature highlight labels with support for RTL
* Code review improvements
* Clean up feature highlight samples
* Feature Highlight readme
* Update Podfile.lock for Feature Highlight
* Feature highlight readme improvements