Skip to content

Commit

Permalink
Update MaterialDesign buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Jun 22, 2020
1 parent 185e64d commit 0cebad6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion Podfile
Expand Up @@ -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'
Expand Down
22 changes: 13 additions & 9 deletions Podfile.lock
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -681,6 +685,6 @@ SPEC CHECKSUMS:
XCGLogger: 1943831ef907df55108b0b18657953f868de973b
ZIPFoundation: b1f0de4eed33e74a676f76e12559ab6b75990197

PODFILE CHECKSUM: 77e87036e6ec9194b49d5c9927ba5e1e7d5ccf8e
PODFILE CHECKSUM: c2f61f2ba58f06e7af53aebcb4a2eebc16fe20d1

COCOAPODS: 1.9.3

0 comments on commit 0cebad6

Please sign in to comment.