From 388fea7ebe0813b907a4b4cf74772318047e837b Mon Sep 17 00:00:00 2001 From: Andrew Overton Date: Tue, 10 Dec 2019 12:55:06 -0500 Subject: [PATCH] Remove MDCInkColorThemer (#9228) Delete MDCInkColorThemer. Closes #9107 --- MaterialComponents.podspec | 13 ------ components/Ink/BUILD | 9 ---- .../Ink/src/ColorThemer/MDCInkColorThemer.h | 43 ------------------- .../Ink/src/ColorThemer/MDCInkColorThemer.m | 28 ------------ .../src/ColorThemer/MaterialInk+ColorThemer.h | 15 ------- 5 files changed, 108 deletions(-) delete mode 100644 components/Ink/src/ColorThemer/MDCInkColorThemer.h delete mode 100644 components/Ink/src/ColorThemer/MDCInkColorThemer.m delete mode 100644 components/Ink/src/ColorThemer/MaterialInk+ColorThemer.h diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec index 897bfce5249..ddd7c70d5bf 100644 --- a/MaterialComponents.podspec +++ b/MaterialComponents.podspec @@ -1091,19 +1091,6 @@ Pod::Spec.new do |mdc| end end - mdc.subspec "Ink+ColorThemer" do |extension| - extension.ios.deployment_target = '9.0' - extension.public_header_files = [ - "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h" - ] - extension.source_files = [ - "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}" - ] - - extension.dependency "MaterialComponents/#{extension.base_name.split('+')[0]}" - extension.dependency "MaterialComponents/Themes" - end - # LibraryInfo mdc.subspec "LibraryInfo" do |component| diff --git a/components/Ink/BUILD b/components/Ink/BUILD index 76eecf37864..6f337129830 100644 --- a/components/Ink/BUILD +++ b/components/Ink/BUILD @@ -37,14 +37,6 @@ mdc_public_objc_library( ], ) -mdc_extension_objc_library( - name = "ColorThemer", - deps = [ - ":Ink", - "//components/Themes", - ], -) - mdc_objc_library( name = "private", testonly = 1, @@ -65,7 +57,6 @@ mdc_examples_objc_library( mdc_unit_test_objc_library( name = "unit_test_sources", deps = [ - ":ColorThemer", ":Ink", ":private", ], diff --git a/components/Ink/src/ColorThemer/MDCInkColorThemer.h b/components/Ink/src/ColorThemer/MDCInkColorThemer.h deleted file mode 100644 index 3c7bea6d33b..00000000000 --- a/components/Ink/src/ColorThemer/MDCInkColorThemer.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2017-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. - -#import "MaterialInk.h" -#import "MaterialThemes.h" - -#import - -#pragma mark - Soon to be deprecated - -/** - Used to apply a color scheme to theme MDCInkView. - - @warning This class will soon be deprecated. There is no direct replacement. Ink color must be - set by the owning component in a context-specific manner. - */ -__deprecated_msg("Please use Ripple instead.") @interface MDCInkColorThemer : NSObject - -/** - Applies a color scheme to theme a MDCInkView. - - @warning This API will soon be deprecated. There is no direct replacement. Ink color must be - set by the owning component in a context-specific manner. - - @param colorScheme The color scheme to apply to MDCInkView. - @param inkView A MDCInkView instance to apply a color scheme. - */ -+ (void)applyColorScheme:(nonnull id)colorScheme - toInkView:(nonnull MDCInkView *)inkView - __deprecated_msg("Please use Ripple instead."); - -@end diff --git a/components/Ink/src/ColorThemer/MDCInkColorThemer.m b/components/Ink/src/ColorThemer/MDCInkColorThemer.m deleted file mode 100644 index 0ebb6a21631..00000000000 --- a/components/Ink/src/ColorThemer/MDCInkColorThemer.m +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2017-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. - -#import "MDCInkColorThemer.h" - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-implementations" -@implementation MDCInkColorThemer -#pragma clang diagnostic pop - -+ (void)applyColorScheme:(id)colorScheme toInkView:(MDCInkView *)inkView { - if ([colorScheme respondsToSelector:@selector(primaryLightColor)]) { - inkView.inkColor = colorScheme.primaryLightColor; - } -} - -@end diff --git a/components/Ink/src/ColorThemer/MaterialInk+ColorThemer.h b/components/Ink/src/ColorThemer/MaterialInk+ColorThemer.h deleted file mode 100644 index 330fccdf677..00000000000 --- a/components/Ink/src/ColorThemer/MaterialInk+ColorThemer.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2018-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. - -#import "MDCInkColorThemer.h"