From 0cebad636592e0732a03b785195ad73a478275df Mon Sep 17 00:00:00 2001 From: Robbie Trencheny Date: Sun, 21 Jun 2020 17:04:30 -0700 Subject: [PATCH] Update MaterialDesign buttons --- .../OnboardingNavigationViewController.swift | 15 +++++-------- Podfile | 2 +- Podfile.lock | 22 +++++++++++-------- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/HomeAssistant/Views/Onboarding/OnboardingNavigationViewController.swift b/HomeAssistant/Views/Onboarding/OnboardingNavigationViewController.swift index bea27c9be..834848238 100644 --- a/HomeAssistant/Views/Onboarding/OnboardingNavigationViewController.swift +++ b/HomeAssistant/Views/Onboarding/OnboardingNavigationViewController.swift @@ -10,9 +10,7 @@ import UIKit import Eureka import Shared import MaterialComponents.MaterialButtons -import MaterialComponents.MaterialButtons_ButtonThemer -import MaterialComponents.MaterialButtons_ColorThemer -import MaterialComponents.MDCContainedButtonThemer +import MaterialComponents.MaterialButtons_Theming import Reachability class OnboardingNavigationViewController: UINavigationController, RowControllerType { @@ -61,13 +59,10 @@ class OnboardingNavigationViewController: UINavigationController, RowControllerT */ func styleButton(_ button: MDCButton) { - let buttonScheme = MDCButtonScheme() - MDCContainedButtonThemer.applyScheme(buttonScheme, to: button) - - let containerScheme = MDCSemanticColorScheme(defaults: .material201804) - containerScheme.primaryColor = .white - containerScheme.secondaryColor = Constants.blue - MDCContainedButtonColorThemer.applySemanticColorScheme(containerScheme, to: button) + let containerScheme = MDCContainerScheme() + containerScheme.colorScheme.primaryColor = .white + containerScheme.colorScheme.secondaryColor = Constants.blue + button.applyContainedTheme(withScheme: containerScheme) button.setTitleColor(Constants.blue, for: .normal) diff --git a/Podfile b/Podfile index 76c829302..1c31d7184 100644 --- a/Podfile +++ b/Podfile @@ -55,7 +55,7 @@ target 'HomeAssistant' do pod 'Lokalise', '~> 0.10.0' pod 'lottie-ios' pod 'MaterialComponents/Buttons' - pod 'MaterialComponents/Buttons+ButtonThemer' + pod 'MaterialComponents/Buttons+Theming' pod 'MBProgressHUD', '~> 1.2.0' pod 'SimulatorStatusMagic', :configurations => ['Debug'] pod 'SwiftGen', '~> 6.1.0' diff --git a/Podfile.lock b/Podfile.lock index 6b17dfa78..41bd44832 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -376,18 +376,19 @@ PODS: - MaterialComponents/Typography - MDFInternationalization - MDFTextAccessibility - - "MaterialComponents/Buttons+ButtonThemer (109.8.0)": - - MaterialComponents/Buttons - - "MaterialComponents/Buttons+ColorThemer" - - "MaterialComponents/Buttons+ShapeThemer" - - "MaterialComponents/Buttons+TypographyThemer" - - MaterialComponents/Palettes - "MaterialComponents/Buttons+ColorThemer (109.8.0)": - MaterialComponents/Buttons - MaterialComponents/schemes/Color - "MaterialComponents/Buttons+ShapeThemer (109.8.0)": - MaterialComponents/Buttons - MaterialComponents/schemes/Shape + - "MaterialComponents/Buttons+Theming (109.8.0)": + - MaterialComponents/Buttons + - "MaterialComponents/Buttons+ColorThemer" + - "MaterialComponents/Buttons+ShapeThemer" + - "MaterialComponents/Buttons+TypographyThemer" + - MaterialComponents/schemes/Container + - MaterialComponents/ShadowElevations - "MaterialComponents/Buttons+TypographyThemer (109.8.0)": - MaterialComponents/Buttons - MaterialComponents/schemes/Typography @@ -399,7 +400,6 @@ PODS: - MaterialComponents/Availability - MaterialComponents/private/Color - MaterialComponents/private/Math - - MaterialComponents/Palettes (109.8.0) - MaterialComponents/private/Application (109.8.0) - MaterialComponents/private/Color (109.8.0): - MaterialComponents/Availability @@ -412,6 +412,10 @@ PODS: - MaterialComponents/schemes/Color (109.8.0): - MaterialComponents/Availability - MaterialComponents/private/Color + - MaterialComponents/schemes/Container (109.8.0): + - MaterialComponents/schemes/Color + - MaterialComponents/schemes/Shape + - MaterialComponents/schemes/Typography - MaterialComponents/schemes/Shape (109.8.0): - MaterialComponents/ShapeLibrary - MaterialComponents/Shapes @@ -502,7 +506,7 @@ DEPENDENCIES: - Lokalise (~> 0.10.0) - lottie-ios - MaterialComponents/Buttons - - "MaterialComponents/Buttons+ButtonThemer" + - "MaterialComponents/Buttons+Theming" - MBProgressHUD (~> 1.2.0) - ObjectMapper (from `https://github.com/tristanhimmelman/ObjectMapper.git`, branch `master`) - PromiseKit @@ -681,6 +685,6 @@ SPEC CHECKSUMS: XCGLogger: 1943831ef907df55108b0b18657953f868de973b ZIPFoundation: b1f0de4eed33e74a676f76e12559ab6b75990197 -PODFILE CHECKSUM: 77e87036e6ec9194b49d5c9927ba5e1e7d5ccf8e +PODFILE CHECKSUM: c2f61f2ba58f06e7af53aebcb4a2eebc16fe20d1 COCOAPODS: 1.9.3