diff --git a/CHANGELOG.md b/CHANGELOG.md
index f958bc8cbd4..fd26965ccac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,57 @@
+# 113.0.0
+
+In this major release we have dropped support for iOS 9.0, added support to Catalyst for our catalogs, and enlarged the minimum touch target of the thumb view of our Slider component.
+
+## Breaking changes
+
+* We have dropped support for iOS 9, our minimum iOS version is now set to 10.0.
+* MDCChips visibleAreaInsets property is now set to read only.
+
+## New deprecations
+
+* We have deprecated some MDCSnackbarManager class methods. Please use MDCSnackbarManager.defaultManager and their corresponding instance methods instead.
+
+## API changes
+
+*modified* property: `visibleAreaInsets` in `MDCChipView` to be `readonly`.
+
+## Component changes
+
+### Chips
+
+* [Expose visibleAreaInsets as a public readonly API.](https://github.com/material-components/material-components-ios/commit/f716061f0fe2ad5f05692ee84c1094f20dbbf84f) (Wenyu Zhang)
+* [Remove visibleAreaInsets from public API.](https://github.com/material-components/material-components-ios/commit/899c57e8d5d27d2f57a91c8da50d7d05c0e54798) (Wenyu Zhang)
+
+### Slider
+
+* [Update Slider example to conform to minimum touch size by change frame.](https://github.com/material-components/material-components-ios/commit/e5c046c89a57d382bd01d23abbae9cd2711cdff2) (Wenyu Zhang)
+
+### Snackbar
+
+* [Deprecate all unused class methods.](https://github.com/material-components/material-components-ios/commit/12aa90eac30400ce3400d0946f31d4b46dd9e8ae) (Jeff Verkoeyen)
+* [Internal change](https://github.com/material-components/material-components-ios/commit/0dd6376c6de22ff059f68023f0e876d0e275aeb1) (Jeff Verkoeyen)
+
+### Tabs
+
+* [Clarify handling of safe area layout in the documentation to make clear all properties that need to be set](https://github.com/material-components/material-components-ios/commit/8dac13ae51e05e60b394ac81dffa40cfcfd05bec) (Alyssa Weiss)
+
+### TextControls
+
+* [Add KVO for assistive labels](https://github.com/material-components/material-components-ios/commit/6e52d049a67499ca83c2b3094a4979e12cb06f7d) (Andrew Overton)
+
+### private/ThumbTrack
+
+* [Move primaryColor to the ToBeDeprecated category.](https://github.com/material-components/material-components-ios/commit/79e16bbf1fb0c519007df0a12b5c66a0da6354c1) (Jeff Verkoeyen)
+* [Turn centerVisibleArea on on ThumbView to ensure its minimum touch target size.](https://github.com/material-components/material-components-ios/commit/ab519cac9fef728d8b2a08552f6603634a411c3e) (Wenyu Zhang)
+
+## Multi-component changes
+
+* [Drop support for iOS 9.](https://github.com/material-components/material-components-ios/commit/d7ff705337e62a33e31494ffd58d20239aff80ce) (Jeff Verkoeyen)
+* [Enable Catalyst support for the catalogs.](https://github.com/material-components/material-components-ios/commit/8cea56b40566532b579110e7639be40c52e01e0c) (featherless)
+* [Replace tabs docs](https://github.com/material-components/material-components-ios/commit/0448a330e3f5efe8e5581e31fd1b3fc7a5add79b) (Andrew Overton)
+
+---
+
# 112.1.0
This minor change introduces two new features and fixes crashes due to UIPointerInteraction use in
diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec
index 729fe6ac5e0..34ef7b318a7 100644
--- a/MaterialComponents.podspec
+++ b/MaterialComponents.podspec
@@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb'
Pod::Spec.new do |mdc|
mdc.name = "MaterialComponents"
- mdc.version = "112.1.0"
+ mdc.version = "113.0.0"
mdc.authors = "The Material Components authors."
mdc.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
mdc.homepage = "https://github.com/material-components/material-components-ios"
@@ -11,7 +11,7 @@ Pod::Spec.new do |mdc|
:tag => "v#{mdc.version}" }
mdc.platform = :ios
mdc.requires_arc = true
- mdc.ios.deployment_target = '9.0'
+ mdc.ios.deployment_target = '10.0'
# # Subspec explanation
#
@@ -55,7 +55,7 @@ Pod::Spec.new do |mdc|
# ActionSheet
mdc.subspec "ActionSheet" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -79,7 +79,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "ActionSheet+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}", "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/private/*.{h,m}"
extension.dependency "MaterialComponents/#{extension.base_name.split('+')[0]}"
@@ -101,7 +101,7 @@ Pod::Spec.new do |mdc|
# ActivityIndicator
mdc.subspec "ActivityIndicator" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -128,7 +128,7 @@ Pod::Spec.new do |mdc|
# AnimationTiming
mdc.subspec "AnimationTiming" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -147,7 +147,7 @@ Pod::Spec.new do |mdc|
# AppBar
mdc.subspec "AppBar" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -183,7 +183,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "AppBar+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}", "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/private/*.{h,m}"
extension.dependency "MaterialComponents/#{extension.base_name.split('+')[0]}"
@@ -199,7 +199,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "AppBar+ColorThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -213,7 +213,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "AppBar+TypographyThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -228,7 +228,7 @@ Pod::Spec.new do |mdc|
# Availability
mdc.subspec "Availability" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = "components/#{extension.base_name}/src/*.h"
extension.source_files = "components/#{extension.base_name}/src/*.{h,m}"
end
@@ -236,7 +236,7 @@ Pod::Spec.new do |mdc|
# Banner
mdc.subspec "Banner" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}"
@@ -253,7 +253,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Banner+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -279,7 +279,7 @@ Pod::Spec.new do |mdc|
# BottomAppBar
mdc.subspec "BottomAppBar" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -303,7 +303,7 @@ Pod::Spec.new do |mdc|
# BottomNavigation
mdc.subspec "BottomNavigation" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -342,7 +342,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "BottomNavigation+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -366,7 +366,7 @@ Pod::Spec.new do |mdc|
# BottomSheet
mdc.subspec "BottomSheet" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -393,7 +393,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "BottomSheet+ShapeThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -408,7 +408,7 @@ Pod::Spec.new do |mdc|
# Buttons
mdc.subspec "Buttons" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -440,7 +440,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Buttons+ColorThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -453,7 +453,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Buttons+ShapeThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -466,7 +466,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Buttons+TypographyThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -479,7 +479,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Buttons+ButtonThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -495,7 +495,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Buttons+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -520,7 +520,7 @@ Pod::Spec.new do |mdc|
# ButtonBar
mdc.subspec "ButtonBar" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -543,7 +543,7 @@ Pod::Spec.new do |mdc|
# Cards
mdc.subspec "Cards" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}"
component.exclude_files = [
@@ -568,7 +568,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Cards+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -589,7 +589,7 @@ Pod::Spec.new do |mdc|
# Chips
mdc.subspec "Chips" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -618,7 +618,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Chips+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -640,7 +640,7 @@ Pod::Spec.new do |mdc|
# CollectionCells
mdc.subspec "CollectionCells" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -677,7 +677,7 @@ Pod::Spec.new do |mdc|
# CollectionLayoutAttributes
mdc.subspec "CollectionLayoutAttributes" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}"
@@ -693,7 +693,7 @@ Pod::Spec.new do |mdc|
# Collections
mdc.subspec "Collections" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -726,7 +726,7 @@ Pod::Spec.new do |mdc|
# Dialogs
mdc.subspec "Dialogs" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -755,7 +755,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Dialogs+ColorThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -769,7 +769,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Dialogs+TypographyThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -783,7 +783,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Dialogs+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -806,7 +806,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Elevation" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -828,7 +828,7 @@ Pod::Spec.new do |mdc|
# FeatureHighlight
mdc.subspec "FeatureHighlight" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -851,7 +851,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "FeatureHighlight+ColorThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -866,7 +866,7 @@ Pod::Spec.new do |mdc|
# FlexibleHeader
mdc.subspec "FlexibleHeader" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -895,7 +895,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "FlexibleHeader+ShiftBehavior" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -905,7 +905,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "FlexibleHeader+ShiftBehaviorEnabledWithStatusBar" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -917,7 +917,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "FlexibleHeader+CanAlwaysExpandToMaximumHeight" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -931,7 +931,7 @@ Pod::Spec.new do |mdc|
# HeaderStackView
mdc.subspec "HeaderStackView" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}"
@@ -947,7 +947,7 @@ Pod::Spec.new do |mdc|
# Ink
mdc.subspec "Ink" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -970,7 +970,7 @@ Pod::Spec.new do |mdc|
# LibraryInfo
mdc.subspec "LibraryInfo" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -989,7 +989,7 @@ Pod::Spec.new do |mdc|
# List
mdc.subspec "List" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1015,7 +1015,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "List+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -1036,7 +1036,7 @@ Pod::Spec.new do |mdc|
# NavigationBar
mdc.subspec "NavigationBar" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}"
@@ -1061,7 +1061,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "NavigationBar+ColorThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -1074,7 +1074,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "NavigationBar+TypographyThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -1089,7 +1089,7 @@ Pod::Spec.new do |mdc|
# NavigationDrawer
mdc.subspec "NavigationDrawer" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1114,7 +1114,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "NavigationDrawer+ColorThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -1127,7 +1127,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "NavigationDrawer+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -1139,7 +1139,7 @@ Pod::Spec.new do |mdc|
# OverlayWindow
mdc.subspec "OverlayWindow" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1161,7 +1161,7 @@ Pod::Spec.new do |mdc|
# PageControl
mdc.subspec "PageControl" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1184,7 +1184,7 @@ Pod::Spec.new do |mdc|
# Palettes
mdc.subspec "Palettes" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1203,7 +1203,7 @@ Pod::Spec.new do |mdc|
# ProgressView
mdc.subspec "ProgressView" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1227,7 +1227,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "ProgressView+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -1248,7 +1248,7 @@ Pod::Spec.new do |mdc|
# Ripple
mdc.subspec "Ripple" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}", "components/#{component.base_name}/src/private/*.{h,m}"
@@ -1269,7 +1269,7 @@ Pod::Spec.new do |mdc|
# ShadowElevations
mdc.subspec "ShadowElevations" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}"
@@ -1285,7 +1285,7 @@ Pod::Spec.new do |mdc|
# ShadowLayer
mdc.subspec "ShadowLayer" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}"
@@ -1303,7 +1303,7 @@ Pod::Spec.new do |mdc|
# ShapeLibrary
mdc.subspec "ShapeLibrary" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}", "components/#{component.base_name}/src/private/*.{h,m}"
@@ -1319,7 +1319,7 @@ Pod::Spec.new do |mdc|
# Shapes
mdc.subspec "Shapes" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = "components/#{component.base_name}/src/*.{h,m}", "components/#{component.base_name}/src/private/*.{h,m}"
@@ -1336,7 +1336,7 @@ Pod::Spec.new do |mdc|
# Slider
mdc.subspec "Slider" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = [
"components/#{component.base_name}/src/*.h"
]
@@ -1361,7 +1361,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Slider+ColorThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -1377,7 +1377,7 @@ Pod::Spec.new do |mdc|
# Snackbar
mdc.subspec "Snackbar" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1413,7 +1413,7 @@ Pod::Spec.new do |mdc|
# Tabs
mdc.subspec "Tabs" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1448,7 +1448,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Tabs+TypographyThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -1461,7 +1461,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Tabs+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -1481,7 +1481,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Tabs+TabBarView" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -1503,7 +1503,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "Tabs+TabBarViewTheming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -1523,7 +1523,7 @@ Pod::Spec.new do |mdc|
# TextFields
mdc.subspec "TextFields" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1552,7 +1552,7 @@ Pod::Spec.new do |mdc|
# TextControls+Enums
mdc.subspec "TextControls+Enums" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}"
end
@@ -1560,7 +1560,7 @@ Pod::Spec.new do |mdc|
# TextControls+BaseTextAreas
mdc.subspec "TextControls+BaseTextAreas" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [ "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/private/*.{h,m}"
@@ -1581,7 +1581,7 @@ Pod::Spec.new do |mdc|
# TextControls+BaseTextFields
mdc.subspec "TextControls+BaseTextFields" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [ "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/private/*.{h,m}"
@@ -1603,7 +1603,7 @@ Pod::Spec.new do |mdc|
# TextControls+FilledTextAreas
mdc.subspec "TextControls+FilledTextAreas" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1625,7 +1625,7 @@ Pod::Spec.new do |mdc|
# TextControls+FilledTextAreasTheming
mdc.subspec "TextControls+FilledTextAreasTheming" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1645,7 +1645,7 @@ Pod::Spec.new do |mdc|
# TextControls+FilledTextFields
mdc.subspec "TextControls+FilledTextFields" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1667,7 +1667,7 @@ Pod::Spec.new do |mdc|
# TextControls+FilledTextFieldsTheming
mdc.subspec "TextControls+FilledTextFieldsTheming" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1687,7 +1687,7 @@ Pod::Spec.new do |mdc|
# TextControls+OutlinedTextAreas
mdc.subspec "TextControls+OutlinedTextAreas" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1709,7 +1709,7 @@ Pod::Spec.new do |mdc|
# TextControls+OutlinedTextAreasTheming
mdc.subspec "TextControls+OutlinedTextAreasTheming" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1730,7 +1730,7 @@ Pod::Spec.new do |mdc|
# TextControls+OutlinedTextFields
mdc.subspec "TextControls+OutlinedTextFields" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1752,7 +1752,7 @@ Pod::Spec.new do |mdc|
# TextControls+OutlinedTextFieldsTheming
mdc.subspec "TextControls+OutlinedTextFieldsTheming" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1772,7 +1772,7 @@ Pod::Spec.new do |mdc|
# TextControls+UnderlinedTextFields
mdc.subspec "TextControls+UnderlinedTextFields" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1787,7 +1787,7 @@ Pod::Spec.new do |mdc|
# TextControls+UnderlinedTextFieldsTheming
mdc.subspec "TextControls+UnderlinedTextFieldsTheming" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [
"components/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}",
@@ -1799,7 +1799,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "TextFields+ColorThemer" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
@@ -1812,7 +1812,7 @@ Pod::Spec.new do |mdc|
end
mdc.subspec "TextFields+Theming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.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}",
@@ -1834,7 +1834,7 @@ Pod::Spec.new do |mdc|
# Themes
mdc.subspec "Themes" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1856,7 +1856,7 @@ Pod::Spec.new do |mdc|
# Typography
mdc.subspec "Typography" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/*.h"
component.source_files = [
"components/#{component.base_name}/src/*.{h,m}",
@@ -1879,7 +1879,7 @@ Pod::Spec.new do |mdc|
mdc.subspec "schemes" do |scheme_spec|
scheme_spec.subspec "Color" do |scheme|
- scheme.ios.deployment_target = '9.0'
+ scheme.ios.deployment_target = '10.0'
scheme.public_header_files = "components/schemes/#{scheme.base_name}/src/*.h"
scheme.source_files = "components/schemes/#{scheme.base_name}/src/*.{h,m}"
@@ -1896,7 +1896,7 @@ Pod::Spec.new do |mdc|
end
end
scheme_spec.subspec "Container" do |scheme|
- scheme.ios.deployment_target = '9.0'
+ scheme.ios.deployment_target = '10.0'
scheme.public_header_files = "components/schemes/#{scheme.base_name}/src/*.h"
scheme.source_files = "components/schemes/#{scheme.base_name}/src/*.{h,m}"
scheme.dependency "MaterialComponents/schemes/Color"
@@ -1911,7 +1911,7 @@ Pod::Spec.new do |mdc|
end
end
scheme_spec.subspec "Shape" do |scheme|
- scheme.ios.deployment_target = '9.0'
+ scheme.ios.deployment_target = '10.0'
scheme.public_header_files = "components/schemes/#{scheme.base_name}/src/*.h"
scheme.source_files = "components/schemes/#{scheme.base_name}/src/*.{h,m}"
scheme.dependency "MaterialComponents/ShapeLibrary"
@@ -1926,7 +1926,7 @@ Pod::Spec.new do |mdc|
end
end
scheme_spec.subspec "Typography" do |scheme|
- scheme.ios.deployment_target = '9.0'
+ scheme.ios.deployment_target = '10.0'
scheme.public_header_files = "components/schemes/#{scheme.base_name}/src/*.h"
scheme.source_files = "components/schemes/#{scheme.base_name}/src/*.{h,m}"
scheme.dependency "MaterialComponents/Typography"
@@ -1942,7 +1942,7 @@ Pod::Spec.new do |mdc|
end
end
scheme_spec.subspec "Typography+BasicFontScheme" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = "components/schemes/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
extension.source_files = [
"components/schemes/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}",
@@ -1950,7 +1950,7 @@ Pod::Spec.new do |mdc|
]
end
scheme_spec.subspec "Typography+Scheming" do |extension|
- extension.ios.deployment_target = '9.0'
+ extension.ios.deployment_target = '10.0'
extension.public_header_files = "components/schemes/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
extension.source_files = [
"components/schemes/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}",
@@ -1966,7 +1966,7 @@ Pod::Spec.new do |mdc|
registerIcons(private_spec)
private_spec.subspec "Application" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = "components/private/#{component.base_name}/src/*.{h,m}"
@@ -1980,7 +1980,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "Color" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = "components/private/#{component.base_name}/src/*.{h,m}"
@@ -1996,7 +1996,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "KeyboardWatcher" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = "components/private/#{component.base_name}/src/*.{h,m}"
@@ -2012,7 +2012,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "Math" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = "components/private/#{component.base_name}/src/*.{h,m}"
component.test_spec 'UnitTests' do |unit_tests|
@@ -2025,7 +2025,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "Overlay" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = [
"components/private/#{component.base_name}/src/*.{h,m}",
@@ -2042,7 +2042,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "TextControlsPrivate+Shared" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [ "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}"
]
@@ -2052,7 +2052,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "TextControlsPrivate+BaseStyle" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [ "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}"
]
@@ -2062,7 +2062,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "TextControlsPrivate+FilledStyle" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [ "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}"
]
@@ -2075,7 +2075,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "TextControlsPrivate+OutlinedStyle" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [ "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}"
]
@@ -2086,7 +2086,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "TextControlsPrivate+TextFields" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [ "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}"
]
@@ -2102,7 +2102,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "TextControlsPrivate+UnderlinedStyle" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.h"
component.source_files = [ "components/private/#{component.base_name.split('+')[0]}/src/#{component.base_name.split('+')[1]}/*.{h,m}"
]
@@ -2113,7 +2113,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "ThumbTrack" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = [
"components/private/#{component.base_name}/src/*.{h,m}",
@@ -2140,7 +2140,7 @@ Pod::Spec.new do |mdc|
end
private_spec.subspec "UIMetrics" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = [
"components/private/#{component.base_name}/src/*.{h,m}",
diff --git a/MaterialComponentsBeta.podspec b/MaterialComponentsBeta.podspec
index 8433717fa2b..3204166f076 100644
--- a/MaterialComponentsBeta.podspec
+++ b/MaterialComponentsBeta.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |mdc|
mdc.name = "MaterialComponentsBeta"
- mdc.version = "112.1.0"
+ mdc.version = "113.0.0"
mdc.authors = "The Material Components authors."
mdc.summary = "A collection of stand-alone alpha UI libraries that are not yet guaranteed to be ready for general production use. Use with caution."
mdc.homepage = "https://github.com/material-components/material-components-ios"
@@ -8,12 +8,12 @@ Pod::Spec.new do |mdc|
mdc.source = { :git => "https://github.com/material-components/material-components-ios.git", :tag => "v#{mdc.version}" }
mdc.platform = :ios
mdc.requires_arc = true
- mdc.ios.deployment_target = '9.0'
+ mdc.ios.deployment_target = '10.0'
# See MaterialComponents.podspec for the subspec structure and template.
mdc.subspec "BottomNavigation" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/#{component.base_name}/src/MDCBottomNavigationBarController.h", "components/#{component.base_name}/src/MaterialBottomNavigationBeta.h"
component.source_files = "components/#{component.base_name}/src/MDCBottomNavigationBarController.*", "components/#{component.base_name}/src/MaterialBottomNavigationBeta.h"
component.dependency "MaterialComponents/BottomNavigation"
@@ -32,7 +32,7 @@ Pod::Spec.new do |mdc|
# CocoaPods requires at least one file to show up in a subspec, so we depend on the fake
# "Beta" component as a baseline.
private_spec.subspec "Beta" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = "components/private/#{component.base_name}/src/*.{h,m}"
end
diff --git a/MaterialComponentsEarlGreyTests.podspec b/MaterialComponentsEarlGreyTests.podspec
index 5bfe1b26642..0c088b8f592 100644
--- a/MaterialComponentsEarlGreyTests.podspec
+++ b/MaterialComponentsEarlGreyTests.podspec
@@ -1,13 +1,13 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsEarlGreyTests"
- s.version = "112.1.0"
+ s.version = "113.0.0"
s.authors = "The Material Components authors."
s.summary = "This spec is an aggregate of all the Material Components EarlGrey tests."
s.description = "This spec is made for use in the MDC Catalog."
s.homepage = "https://github.com/material-components/material-components-ios"
s.license = 'Apache 2.0'
s.source = { :git => "https://github.com/material-components/material-components-ios.git", :tag => "v#{s.version}" }
- s.platform = :ios, '9.0'
+ s.platform = :ios, '10.0'
s.requires_arc = true
s.source_files = 'components/*/tests/earlgrey/*.{h,m,swift}', 'components/private/*/tests/earlgrey/*.{h,m,swift}'
s.framework = 'XCTest'
diff --git a/MaterialComponentsExamples.podspec b/MaterialComponentsExamples.podspec
index 1b3056eb888..951ebb6aab0 100644
--- a/MaterialComponentsExamples.podspec
+++ b/MaterialComponentsExamples.podspec
@@ -1,13 +1,13 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsExamples"
- s.version = "112.1.0"
+ s.version = "113.0.0"
s.authors = "The Material Components authors."
s.summary = "This spec is an aggregate of all the Material Components examples."
s.description = "This spec is made for use in the MDC Catalog. Used in conjunction with CatalogByConvention we create our Material Catalog."
s.homepage = "https://github.com/material-components/material-components-ios"
s.license = 'Apache 2.0'
s.source = { :git => "https://github.com/material-components/material-components-ios.git", :tag => "v#{s.version}" }
- s.platform = :ios, '9.0'
+ s.platform = :ios, '10.0'
s.requires_arc = true
s.source_files = ['components/*/examples/*.{h,m,swift}', 'components/*/examples/supplemental/*.{h,m,swift}', 'components/private/*/examples/*.{h,m,swift}', 'components/schemes/*/examples/*.{h,m,swift}', 'components/schemes/*/examples/supplemental/*.{h,m,swift}']
diff --git a/MaterialComponentsSnapshotTests.podspec b/MaterialComponentsSnapshotTests.podspec
index f496d0099f8..24b9677e019 100644
--- a/MaterialComponentsSnapshotTests.podspec
+++ b/MaterialComponentsSnapshotTests.podspec
@@ -53,13 +53,13 @@ end
Pod::Spec.new do |s|
s.name = "MaterialComponentsSnapshotTests"
- s.version = "112.1.0"
+ s.version = "113.0.0"
s.authors = "The Material Components authors."
s.summary = "This spec is an aggregate of all the Material Components snapshot tests."
s.homepage = "https://github.com/material-components/material-components-ios"
s.license = 'Apache 2.0'
s.source = { :git => "https://github.com/material-components/material-components-ios.git", :tag => "v#{s.version}" }
- s.platform = :ios, '9.0'
+ s.platform = :ios, '10.0'
s.requires_arc = true
s.dependency 'MaterialComponents'
s.dependency 'MaterialComponentsBeta'
@@ -71,7 +71,7 @@ Pod::Spec.new do |s|
s.source_files = ["components/private/Snapshot/src/SourceDummies/*.{h,m}"]
s.test_spec "SnapshotTests" do |snapshot_tests|
- snapshot_tests.ios.deployment_target = '9.0'
+ snapshot_tests.ios.deployment_target = '10.0'
snapshot_tests.requires_app_host = true
snapshot_tests.source_files = SnapshotPodspecHelper.snapshot_sources
snapshot_tests.resources = SnapshotPodspecHelper.snapshot_resources
diff --git a/README.md b/README.md
index bca19648979..82c914f946b 100644
--- a/README.md
+++ b/README.md
@@ -47,8 +47,8 @@ The component implementations can be found in Xcode within `Pods > Development P
## Requirements
-- Xcode 9 or higher
-- Minimum iOS deployment target of 9.0 or higher
+- Xcode 10 or higher
+- Minimum iOS deployment target of 10.0 or higher
- CocoaPods 1.5 or higher
## Attributions
diff --git a/VERSION b/VERSION
index 786024eda34..40d44569d78 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-112.1.0
+113.0.0
diff --git a/catalog/MDCActionExtension/MDCActionExtension.entitlements b/catalog/MDCActionExtension/MDCActionExtension.entitlements
new file mode 100644
index 00000000000..d7c971d3117
--- /dev/null
+++ b/catalog/MDCActionExtension/MDCActionExtension.entitlements
@@ -0,0 +1,12 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.cs.disable-library-validation
+
+ com.apple.security.network.client
+
+
+
diff --git a/catalog/MDCCatalog.xcodeproj/project.pbxproj b/catalog/MDCCatalog.xcodeproj/project.pbxproj
index 926ccd88f2f..0fc181c258f 100644
--- a/catalog/MDCCatalog.xcodeproj/project.pbxproj
+++ b/catalog/MDCCatalog.xcodeproj/project.pbxproj
@@ -117,6 +117,8 @@
664524C21C6BA62A001ADBF8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
665A34D91C6BD01900962055 /* MDCCatalog-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MDCCatalog-Bridging-Header.h"; sourceTree = ""; };
6681FDFC1CC586660013A0C7 /* MDCCatalogTileView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MDCCatalogTileView.swift; sourceTree = ""; };
+ 66A69D4024E2FDC900D0698E /* MDCCatalog.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MDCCatalog.entitlements; sourceTree = ""; };
+ 66A69D4124E2FDC900D0698E /* MDCActionExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MDCActionExtension.entitlements; sourceTree = ""; };
66CD19282072A54000DE6340 /* AppTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppTheme.swift; sourceTree = ""; };
66D3389420730A3E00FFA1AB /* MDCThemePickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDCThemePickerViewController.swift; sourceTree = ""; };
88AB955E76304B684707293E /* Pods_MDCActionExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MDCActionExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -161,6 +163,7 @@
64307B391DF74FEF004AE4AC /* MDCActionExtension */ = {
isa = PBXGroup;
children = (
+ 66A69D4124E2FDC900D0698E /* MDCActionExtension.entitlements */,
64307B3A1DF74FEF004AE4AC /* MDCActionViewController.h */,
64307B3B1DF74FEF004AE4AC /* MDCActionViewController.m */,
64307B481DF76170004AE4AC /* Resources */,
@@ -202,6 +205,7 @@
664524B51C6BA62A001ADBF8 /* MDCCatalog */ = {
isa = PBXGroup;
children = (
+ 66A69D4024E2FDC900D0698E /* MDCCatalog.entitlements */,
664524B61C6BA62A001ADBF8 /* AppDelegate.swift */,
66CD19282072A54000DE6340 /* AppTheme.swift */,
665A34D91C6BD01900962055 /* MDCCatalog-Bridging-Header.h */,
@@ -585,15 +589,20 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CODE_SIGN_ENTITLEMENTS = MDCActionExtension/MDCActionExtension.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
+ DEVELOPMENT_TEAM = "";
+ "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
INFOPLIST_FILE = MDCActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.google.mdc-catalog.MDCActionExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Google Development";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
SKIP_INSTALL = YES;
+ SUPPORTS_MACCATALYST = YES;
SWIFT_VERSION = 4.2;
};
name = Debug;
@@ -607,15 +616,20 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CODE_SIGN_ENTITLEMENTS = MDCActionExtension/MDCActionExtension.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
+ DEVELOPMENT_TEAM = "";
+ "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
INFOPLIST_FILE = MDCActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.google.mdc-catalog.MDCActionExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Google Development";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
SKIP_INSTALL = YES;
+ SUPPORTS_MACCATALYST = YES;
SWIFT_VERSION = 4.2;
};
name = Release;
@@ -733,17 +747,23 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = MDCCatalog/MDCCatalog.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
+ DEVELOPMENT_TEAM = "";
+ "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
INFOPLIST_FILE = MDCCatalog/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.google.MDCCatalog;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Google Development";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
+ SUPPORTS_MACCATALYST = YES;
SWIFT_OBJC_BRIDGING_HEADER = "MDCCatalog/MDCCatalog-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
+ TARGETED_DEVICE_FAMILY = "1,2,6";
};
name = Debug;
};
@@ -754,16 +774,22 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = MDCCatalog/MDCCatalog.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
+ DEVELOPMENT_TEAM = "";
+ "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
INFOPLIST_FILE = MDCCatalog/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.google.MDCCatalog;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Google Development";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
+ SUPPORTS_MACCATALYST = YES;
SWIFT_OBJC_BRIDGING_HEADER = "MDCCatalog/MDCCatalog-Bridging-Header.h";
SWIFT_VERSION = 4.2;
+ TARGETED_DEVICE_FAMILY = "1,2,6";
};
name = Release;
};
diff --git a/catalog/MDCCatalog.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/catalog/MDCCatalog.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
index 949b6789820..6631ffa6f24 100644
--- a/catalog/MDCCatalog.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ b/catalog/MDCCatalog.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -2,7 +2,5 @@
- BuildSystemType
- Original
diff --git a/catalog/MDCCatalog/Info.plist b/catalog/MDCCatalog/Info.plist
index 9f9b823d389..17009b87df8 100644
--- a/catalog/MDCCatalog/Info.plist
+++ b/catalog/MDCCatalog/Info.plist
@@ -15,11 +15,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 112.1.0
+ 113.0.0
CFBundleSignature
????
CFBundleVersion
- 112.1.0
+ 113.0.0
LSRequiresIPhoneOS
UIAppFonts
diff --git a/catalog/MDCCatalog/MDCCatalog.entitlements b/catalog/MDCCatalog/MDCCatalog.entitlements
new file mode 100644
index 00000000000..d7c971d3117
--- /dev/null
+++ b/catalog/MDCCatalog/MDCCatalog.entitlements
@@ -0,0 +1,12 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.cs.disable-library-validation
+
+ com.apple.security.network.client
+
+
+
diff --git a/catalog/MDCDragons.xcodeproj/project.pbxproj b/catalog/MDCDragons.xcodeproj/project.pbxproj
index 8c517762392..ef88c19a674 100644
--- a/catalog/MDCDragons.xcodeproj/project.pbxproj
+++ b/catalog/MDCDragons.xcodeproj/project.pbxproj
@@ -35,6 +35,7 @@
5CE8092C1FD729880068A050 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
5CE809381FD729880068A050 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
63301F6E1E07E3E0BAAFE1AF /* Pods-MDCDragons.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MDCDragons.release.xcconfig"; path = "Pods/Target Support Files/Pods-MDCDragons/Pods-MDCDragons.release.xcconfig"; sourceTree = ""; };
+ 66A69D4224E310E100D0698E /* MDCDragons.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MDCDragons.entitlements; sourceTree = ""; };
D1727545609D5A05DD1A8DD8 /* Pods_MDCDragons.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MDCDragons.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DF373EC1248FF0C900F47798 /* MDCCatalogWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MDCCatalogWindow.swift; sourceTree = ""; };
/* End PBXFileReference section */
@@ -72,6 +73,7 @@
5CE8092B1FD729880068A050 /* MDCDragons */ = {
isa = PBXGroup;
children = (
+ 66A69D4224E310E100D0698E /* MDCDragons.entitlements */,
DF373EC1248FF0C900F47798 /* MDCCatalogWindow.swift */,
5CE8092C1FD729880068A050 /* AppDelegate.swift */,
5C3964411FD72D0E003CB44B /* MDCDragonsController.swift */,
@@ -372,16 +374,21 @@
baseConfigurationReference = 096F30AD42FD7675B81193D1 /* Pods-MDCDragons.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconInverse;
+ CODE_SIGN_ENTITLEMENTS = MDCDragons/MDCDragons.entitlements;
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
+ DEVELOPMENT_TEAM = "";
+ "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
INFOPLIST_FILE = MDCDragons/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.google.MDCDragons;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Google Development";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
+ SUPPORTS_MACCATALYST = YES;
SWIFT_VERSION = 4.2;
- TARGETED_DEVICE_FAMILY = "1,2";
+ TARGETED_DEVICE_FAMILY = "1,2,6";
};
name = Debug;
};
@@ -390,16 +397,21 @@
baseConfigurationReference = 63301F6E1E07E3E0BAAFE1AF /* Pods-MDCDragons.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconInverse;
+ CODE_SIGN_ENTITLEMENTS = MDCDragons/MDCDragons.entitlements;
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
+ DEVELOPMENT_TEAM = "";
+ "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
INFOPLIST_FILE = MDCDragons/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.google.MDCDragons;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Google Development";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
+ SUPPORTS_MACCATALYST = YES;
SWIFT_VERSION = 4.2;
- TARGETED_DEVICE_FAMILY = "1,2";
+ TARGETED_DEVICE_FAMILY = "1,2,6";
};
name = Release;
};
diff --git a/catalog/MDCDragons/Info.plist b/catalog/MDCDragons/Info.plist
index 2f8efe906aa..fc8079233f4 100644
--- a/catalog/MDCDragons/Info.plist
+++ b/catalog/MDCDragons/Info.plist
@@ -15,9 +15,9 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 112.1.0
+ 113.0.0
CFBundleVersion
- 112.1.0
+ 113.0.0
LSRequiresIPhoneOS
UILaunchStoryboardName
diff --git a/catalog/MDCDragons/MDCDragons.entitlements b/catalog/MDCDragons/MDCDragons.entitlements
new file mode 100644
index 00000000000..d7c971d3117
--- /dev/null
+++ b/catalog/MDCDragons/MDCDragons.entitlements
@@ -0,0 +1,12 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.cs.disable-library-validation
+
+ com.apple.security.network.client
+
+
+
diff --git a/catalog/MaterialCatalog/MaterialCatalog.podspec b/catalog/MaterialCatalog/MaterialCatalog.podspec
index f8cf07d66e0..611d32c4a79 100644
--- a/catalog/MaterialCatalog/MaterialCatalog.podspec
+++ b/catalog/MaterialCatalog/MaterialCatalog.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialCatalog"
- s.version = "112.1.0"
+ s.version = "113.0.0"
s.summary = "Helper Objective-C classes for the MDC catalog."
s.description = "This spec is made for use in the MDC Catalog."
s.homepage = "https://github.com/material-components/material-components-ios"
diff --git a/catalog/Podfile b/catalog/Podfile
index adca76b198e..669978a7d2d 100644
--- a/catalog/Podfile
+++ b/catalog/Podfile
@@ -5,7 +5,7 @@ project 'MDCCatalog.xcodeproj'
# install! 'cocoapods', :disable_input_output_paths => true
target "MDCCatalog" do
- platform :ios, '9.0'
+ platform :ios, '10.0'
project 'MDCCatalog.xcodeproj'
pod 'MaterialComponentsExamples', :path => '../'
pod 'MaterialComponents', :path => '../', :testspecs => [
@@ -99,7 +99,7 @@ target "MDCCatalog" do
end
target "MDCActionExtension" do
- platform :ios, '9.0'
+ platform :ios, '10.0'
project 'MDCCatalog.xcodeproj'
pod 'MaterialComponentsExamples', :path => '../'
pod 'MaterialComponents', :path => '../'
@@ -111,7 +111,7 @@ target "MDCActionExtension" do
end
target "MDCDragons" do
- platform :ios, '9.0'
+ platform :ios, '10.0'
project 'MDCDragons.xcodeproj'
pod 'CatalogByConvention', "~> 2.5"
pod 'MaterialComponents', :path => '../'
diff --git a/components/Cards/README.md b/components/Cards/README.md
index 1895367a027..07c39b0f502 100644
--- a/components/Cards/README.md
+++ b/components/Cards/README.md
@@ -312,7 +312,7 @@ _**Note:** All the optional elements of a card's content are implemented through
### Theming cards
-Cards supports Material Theming using a Container Scheme. MDCCard and MDCCardCollectionCell have both default and outlined theming methods. [Learn more about theming extensions](../../docs/theming.md). Below is a screenshot of an MDCCard with the Material Design Shrine theme:
+Cards supports Material Theming using a Container Scheme. `MDCCard` and `MDCCardCollectionCell` have both default and outlined theming methods. [Learn more about theming extensions](../../docs/theming.md). Below is a screenshot of an `MDCCard` with the Material Design Shrine theme:
![Shrine card](docs/assets/shrine-card.png)
diff --git a/components/Cards/examples/CardsShapedEditReorderExample.swift b/components/Cards/examples/CardsShapedEditReorderExample.swift
index c8438030ef3..fc1be38810a 100644
--- a/components/Cards/examples/CardsShapedEditReorderExample.swift
+++ b/components/Cards/examples/CardsShapedEditReorderExample.swift
@@ -13,10 +13,9 @@
// limitations under the License.
import UIKit
-
import MaterialComponents.MaterialCards
-import MaterialComponents.MaterialContainerScheme
import MaterialComponents.MaterialShapeLibrary
+import MaterialComponents.MaterialContainerScheme
class ShapedCardCollectionCell: MDCCardCollectionCell {
override init(frame: CGRect) {
@@ -43,7 +42,8 @@ class ShapedCardCollectionCell: MDCCardCollectionCell {
class CardsShapedEditReorderExampleViewController: UIViewController,
UICollectionViewDelegate,
UICollectionViewDataSource,
- UICollectionViewDelegateFlowLayout {
+ UICollectionViewDelegateFlowLayout
+{
@objc var containerScheme: MDCContainerScheming
@@ -57,11 +57,13 @@ class CardsShapedEditReorderExampleViewController: UIViewController,
}
enum ToggleMode: Int {
- case edit = 1, reorder
+ case edit = 1
+ case reorder
}
-
- let collectionView = UICollectionView(frame: .zero,
- collectionViewLayout: UICollectionViewFlowLayout())
+
+ let collectionView = UICollectionView(
+ frame: .zero,
+ collectionViewLayout: UICollectionViewFlowLayout())
var dataSource = [(Int, Bool)]()
var longPressGesture: UILongPressGestureRecognizer!
var toggle = ToggleMode.reorder
@@ -74,19 +76,21 @@ class CardsShapedEditReorderExampleViewController: UIViewController,
collectionView.dataSource = self
collectionView.delegate = self
collectionView.backgroundColor = UIColor(white: 0.9, alpha: 1)
- collectionView.alwaysBounceVertical = true;
+ collectionView.alwaysBounceVertical = true
collectionView.register(ShapedCardCollectionCell.self, forCellWithReuseIdentifier: "Cell")
collectionView.translatesAutoresizingMaskIntoConstraints = false
collectionView.allowsMultipleSelection = true
view.addSubview(collectionView)
- navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Reorder",
- style: .plain,
- target: self,
- action: #selector(toggleModes))
+ navigationItem.rightBarButtonItem = UIBarButtonItem(
+ title: "Reorder",
+ style: .plain,
+ target: self,
+ action: #selector(toggleModes))
- longPressGesture = UILongPressGestureRecognizer(target: self,
- action: #selector(handleReordering(gesture:)))
+ longPressGesture = UILongPressGestureRecognizer(
+ target: self,
+ action: #selector(handleReordering(gesture:)))
longPressGesture.cancelsTouchesInView = false
collectionView.addGestureRecognizer(longPressGesture)
@@ -100,7 +104,8 @@ class CardsShapedEditReorderExampleViewController: UIViewController,
collectionView.leftAnchor.constraint(equalTo: guide.leftAnchor),
collectionView.rightAnchor.constraint(equalTo: guide.rightAnchor),
collectionView.topAnchor.constraint(equalTo: view.topAnchor),
- collectionView.bottomAnchor.constraint(equalTo: guide.bottomAnchor)])
+ collectionView.bottomAnchor.constraint(equalTo: guide.bottomAnchor),
+ ])
collectionView.contentInsetAdjustmentBehavior = .always
} else {
preiOS11Constraints()
@@ -108,14 +113,18 @@ class CardsShapedEditReorderExampleViewController: UIViewController,
}
func preiOS11Constraints() {
- self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[view]|",
- options: [],
- metrics: nil,
- views: ["view": collectionView]));
- self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[view]|",
- options: [],
- metrics: nil,
- views: ["view": collectionView]));
+ self.view.addConstraints(
+ NSLayoutConstraint.constraints(
+ withVisualFormat: "H:|[view]|",
+ options: [],
+ metrics: nil,
+ views: ["view": collectionView]))
+ self.view.addConstraints(
+ NSLayoutConstraint.constraints(
+ withVisualFormat: "V:|[view]|",
+ options: [],
+ metrics: nil,
+ views: ["view": collectionView]))
}
@objc func toggleModes() {
@@ -129,10 +138,14 @@ class CardsShapedEditReorderExampleViewController: UIViewController,
collectionView.reloadData()
}
- func collectionView(_ collectionView: UICollectionView,
- cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
- let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell",
- for: indexPath) as! MDCCardCollectionCell
+ func collectionView(
+ _ collectionView: UICollectionView,
+ cellForItemAt indexPath: IndexPath
+ ) -> UICollectionViewCell {
+ let cell =
+ collectionView.dequeueReusableCell(
+ withReuseIdentifier: "Cell",
+ for: indexPath) as! MDCCardCollectionCell
cell.applyTheme(withScheme: containerScheme)
cell.backgroundColor = .white
cell.isSelectable = (toggle == .edit)
@@ -149,54 +162,70 @@ class CardsShapedEditReorderExampleViewController: UIViewController,
return 1
}
- func collectionView(_ collectionView: UICollectionView,
- numberOfItemsInSection section: Int) -> Int {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ numberOfItemsInSection section: Int
+ ) -> Int {
return dataSource.count
}
- func collectionView(_ collectionView: UICollectionView,
- moveItemAt sourceIndexPath: IndexPath,
- to destinationIndexPath: IndexPath) {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ moveItemAt sourceIndexPath: IndexPath,
+ to destinationIndexPath: IndexPath
+ ) {
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- sizeForItemAt indexPath: IndexPath) -> CGSize {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ sizeForItemAt indexPath: IndexPath
+ ) -> CGSize {
let cardSize = (collectionView.bounds.size.width / 3) - 12
return CGSize(width: cardSize, height: cardSize)
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- insetForSectionAt section: Int) -> UIEdgeInsets {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ insetForSectionAt section: Int
+ ) -> UIEdgeInsets {
return UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8)
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- minimumLineSpacingForSectionAt section: Int) -> CGFloat {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ minimumLineSpacingForSectionAt section: Int
+ ) -> CGFloat {
return 8
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ minimumInteritemSpacingForSectionAt section: Int
+ ) -> CGFloat {
return 8
}
- func collectionView(_ collectionView: UICollectionView,
- canMoveItemAt indexPath: IndexPath) -> Bool {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ canMoveItemAt indexPath: IndexPath
+ ) -> Bool {
return toggle == .reorder
}
- @available(iOS 9.0, *)
@objc func handleReordering(gesture: UILongPressGestureRecognizer) {
if toggle == .reorder {
- switch(gesture.state) {
+ switch gesture.state {
case .began:
- guard let selectedIndexPath = collectionView.indexPathForItem(at:
- gesture.location(in: collectionView)) else {
- break
+ guard
+ let selectedIndexPath = collectionView.indexPathForItem(
+ at:
+ gesture.location(in: collectionView))
+ else {
+ break
}
collectionView.beginInteractiveMovementForItem(at: selectedIndexPath)
case .changed:
@@ -221,4 +250,3 @@ extension CardsShapedEditReorderExampleViewController {
]
}
}
-
diff --git a/components/Cards/examples/EditReorderCollectionViewController.swift b/components/Cards/examples/EditReorderCollectionViewController.swift
index 2d47eb06daa..ab00d54d4a1 100644
--- a/components/Cards/examples/EditReorderCollectionViewController.swift
+++ b/components/Cards/examples/EditReorderCollectionViewController.swift
@@ -13,7 +13,6 @@
// limitations under the License.
import UIKit
-
import MaterialComponents.MaterialColorScheme
import MaterialComponents.MaterialContainerScheme
import MaterialComponents.MaterialTypographyScheme
@@ -21,14 +20,17 @@ import MaterialComponents.MaterialTypographyScheme
class EditReorderCollectionViewController: UIViewController,
UICollectionViewDelegate,
UICollectionViewDataSource,
- UICollectionViewDelegateFlowLayout {
+ UICollectionViewDelegateFlowLayout
+{
enum ToggleMode: Int {
- case edit = 1, reorder
+ case edit = 1
+ case reorder
}
- let collectionView = UICollectionView(frame: .zero,
- collectionViewLayout: UICollectionViewFlowLayout())
+ let collectionView = UICollectionView(
+ frame: .zero,
+ collectionViewLayout: UICollectionViewFlowLayout())
var toggle = ToggleMode.edit
@objc var containerScheme: MDCContainerScheming
@@ -43,11 +45,11 @@ class EditReorderCollectionViewController: UIViewController,
}
let images = [
- (image: "amsterdam-kadoelen", title: "Kadoelen"),
- (image: "amsterdam-zeeburg", title: "Zeeburg"),
+ (image: "amsterdam-kadoelen", title: "Kadoelen"),
+ (image: "amsterdam-zeeburg", title: "Zeeburg"),
(image: "venice-st-marks-square", title: "St. Mark's Square"),
- (image: "venice-grand-canal", title: "Grand Canal"),
- (image: "austin-u-texas-pond", title: "Austin U"),
+ (image: "venice-grand-canal", title: "Grand Canal"),
+ (image: "austin-u-texas-pond", title: "Austin U"),
]
var dataSource: [(image: String, title: String, selected: Bool)] = []
@@ -64,18 +66,20 @@ class EditReorderCollectionViewController: UIViewController,
collectionView.allowsMultipleSelection = true
view.addSubview(collectionView)
- navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Reorder",
- style: .plain,
- target: self,
- action: #selector(toggleModes))
+ navigationItem.rightBarButtonItem = UIBarButtonItem(
+ title: "Reorder",
+ style: .plain,
+ target: self,
+ action: #selector(toggleModes))
- let longPressGesture = UILongPressGestureRecognizer(target: self,
- action: #selector(reorderCards(gesture:)))
+ let longPressGesture = UILongPressGestureRecognizer(
+ target: self,
+ action: #selector(reorderCards(gesture:)))
longPressGesture.cancelsTouchesInView = false
collectionView.addGestureRecognizer(longPressGesture)
let count = Int(images.count)
- for index in 0 ..< 30 {
+ for index in 0..<30 {
let ind = index % count
dataSource.append((image: images[ind].image, title: images[ind].title, selected: false))
}
@@ -86,7 +90,8 @@ class EditReorderCollectionViewController: UIViewController,
collectionView.leftAnchor.constraint(equalTo: guide.leftAnchor),
collectionView.rightAnchor.constraint(equalTo: guide.rightAnchor),
collectionView.topAnchor.constraint(equalTo: view.topAnchor),
- collectionView.bottomAnchor.constraint(equalTo: guide.bottomAnchor)])
+ collectionView.bottomAnchor.constraint(equalTo: guide.bottomAnchor),
+ ])
collectionView.contentInsetAdjustmentBehavior = .always
} else {
preiOS11Constraints()
@@ -96,14 +101,18 @@ class EditReorderCollectionViewController: UIViewController,
}
func preiOS11Constraints() {
- self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[view]|",
- options: [],
- metrics: nil,
- views: ["view": collectionView]))
- self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[view]|",
- options: [],
- metrics: nil,
- views: ["view": collectionView]))
+ self.view.addConstraints(
+ NSLayoutConstraint.constraints(
+ withVisualFormat: "H:|[view]|",
+ options: [],
+ metrics: nil,
+ views: ["view": collectionView]))
+ self.view.addConstraints(
+ NSLayoutConstraint.constraints(
+ withVisualFormat: "V:|[view]|",
+ options: [],
+ metrics: nil,
+ views: ["view": collectionView]))
}
func updateTitle() {
@@ -128,14 +137,17 @@ class EditReorderCollectionViewController: UIViewController,
collectionView.reloadData()
}
- func collectionView(_ collectionView: UICollectionView,
- cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ cellForItemAt indexPath: IndexPath
+ ) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath)
guard let cardCell = cell as? CardEditReorderCollectionCell else { return cell }
- cardCell.apply(containerScheme: containerScheme,
- typographyScheme: containerScheme.typographyScheme)
+ cardCell.apply(
+ containerScheme: containerScheme,
+ typographyScheme: containerScheme.typographyScheme)
let title = dataSource[indexPath.item].title
let imageName = dataSource[indexPath.item].image
@@ -167,53 +179,67 @@ class EditReorderCollectionViewController: UIViewController,
return 1
}
- func collectionView(_ collectionView: UICollectionView,
- numberOfItemsInSection section: Int) -> Int {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ numberOfItemsInSection section: Int
+ ) -> Int {
return dataSource.count
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- sizeForItemAt indexPath: IndexPath) -> CGSize {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ sizeForItemAt indexPath: IndexPath
+ ) -> CGSize {
let cardSize = (collectionView.bounds.size.width / 3) - 12
return CGSize(width: cardSize, height: cardSize)
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- insetForSectionAt section: Int) -> UIEdgeInsets {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ insetForSectionAt section: Int
+ ) -> UIEdgeInsets {
return UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8)
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- minimumLineSpacingForSectionAt section: Int) -> CGFloat {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ minimumLineSpacingForSectionAt section: Int
+ ) -> CGFloat {
return 8
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ minimumInteritemSpacingForSectionAt section: Int
+ ) -> CGFloat {
return 8
}
- func collectionView(_ collectionView: UICollectionView,
- canMoveItemAt indexPath: IndexPath) -> Bool {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ canMoveItemAt indexPath: IndexPath
+ ) -> Bool {
return toggle == .reorder
}
- func collectionView(_ collectionView: UICollectionView,
- moveItemAt sourceIndexPath: IndexPath,
- to destinationIndexPath: IndexPath) {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ moveItemAt sourceIndexPath: IndexPath,
+ to destinationIndexPath: IndexPath
+ ) {
let sourceItem = dataSource[sourceIndexPath.item]
// reorder all cells in between source and destination, moving each by 1 position
if sourceIndexPath.item < destinationIndexPath.item {
- for ind in sourceIndexPath.item ..< destinationIndexPath.item {
+ for ind in sourceIndexPath.item.. [String: Any] {
diff --git a/components/Chips/src/MDCChipView.h b/components/Chips/src/MDCChipView.h
index 538e46527fc..307d3df5cc0 100644
--- a/components/Chips/src/MDCChipView.h
+++ b/components/Chips/src/MDCChipView.h
@@ -176,6 +176,13 @@
*/
@property(nonatomic, assign) BOOL centerVisibleArea;
+/**
+The calculated inset or outset margins for the rectangle surrounding all of the chip’s visible area.
+
+When @c centerVisibleArea is @c NO, this value is @c UIEdgeInsetsZero.
+*/
+@property(nonatomic, readonly) UIEdgeInsets visibleAreaInsets;
+
/**
A block that is invoked when the MDCChipView receives a call to @c
traitCollectionDidChange:. The block is called after the call to the superclass.
@@ -345,17 +352,6 @@
- (void)setTitleColor:(nullable UIColor *)titleColor
forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
-#pragma mark - Deprecated
-
-/**
-The inset or outset margins for the rectangle surrounding all of the chip’s visible area.
-
-A positive value shrinks the visible area of the chip. A negative value expands the visible area
-of the chip.
-*/
-@property(nonatomic, assign) UIEdgeInsets visibleAreaInsets
- __attribute__((deprecated("Consider using centerVisibleArea to adjust visible area.")));
-
@end
@interface MDCChipView (ToBeDeprecated)
diff --git a/components/Chips/src/MDCChipView.m b/components/Chips/src/MDCChipView.m
index eb90b2c38e0..ede9af9b390 100644
--- a/components/Chips/src/MDCChipView.m
+++ b/components/Chips/src/MDCChipView.m
@@ -118,6 +118,7 @@ @interface MDCChipView ()
@property(nonatomic, readonly) CGFloat pixelScale;
@property(nonatomic, assign) BOOL enableRippleBehavior;
@property(nonatomic, assign) BOOL adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable;
+@property(nonatomic, assign) UIEdgeInsets visibleAreaInsets;
@property(nonatomic, assign) UIEdgeInsets currentVisibleAreaInsets;
@property(nonatomic, assign) CGFloat currentCornerRadius;
@end
diff --git a/components/Chips/tests/snapshot/MDCChipViewSnapshotTests.m b/components/Chips/tests/snapshot/MDCChipViewSnapshotTests.m
index 80aba5d3a0d..2c55492e59d 100644
--- a/components/Chips/tests/snapshot/MDCChipViewSnapshotTests.m
+++ b/components/Chips/tests/snapshot/MDCChipViewSnapshotTests.m
@@ -663,25 +663,6 @@ - (void)testChipWithCustomCornerRadiusAndResetShapeGeneratorToNil {
[self generateSnapshotAndVerifyForView:self.chip];
}
-// TODO(b/159934812): Remove this test after removing visibleAreaInsets.
-- (void)testChipWithVisibleAreaInsets {
- // When
- self.chip.visibleAreaInsets = UIEdgeInsetsMake(20, 20, 20, 20);
-
- // Then
- [self generateSnapshotAndVerifyForView:self.chip];
-}
-
-// TODO(b/159934812): Remove this test after removing visibleAreaInsets.
-- (void)testChipWithCustomCornerRadiusAndVisibleAreaInsets {
- // When
- self.chip.cornerRadius = 5;
- self.chip.visibleAreaInsets = UIEdgeInsetsMake(20, 20, 20, 20);
-
- // Then
- [self generateSnapshotAndVerifyForView:self.chip];
-}
-
- (void)testChipWithCustomFrame {
// When
self.chip.bounds = CGRectMake(0, 0, 80, 44);
diff --git a/components/Chips/tests/unit/MDCChipViewTests.m b/components/Chips/tests/unit/MDCChipViewTests.m
index 08e3edb41b3..868f9998017 100644
--- a/components/Chips/tests/unit/MDCChipViewTests.m
+++ b/components/Chips/tests/unit/MDCChipViewTests.m
@@ -15,6 +15,7 @@
#import
#import "MDCChipView.h"
+#import "MaterialMath.h"
static inline UIImage *TestImage(CGSize size) {
CGFloat scale = [UIScreen mainScreen].scale;
@@ -248,6 +249,39 @@ - (void)testChipUpdatesSizeWhenImageChanges {
XCTAssertGreaterThan(CGRectGetWidth(chip.bounds), chipSize.width);
}
+- (void)testVisibleAreaInsetsIsZeroWhenCenterVisibleAreaIsNO {
+ // Given
+ MDCChipView *chip = [[MDCChipView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)];
+ chip.titleLabel.text = @"Chip";
+
+ // When
+ chip.centerVisibleArea = NO;
+
+ // Then
+ XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(chip.visibleAreaInsets, UIEdgeInsetsZero));
+}
+
+- (void)testVisibleAreaInsetsIsCorrectWhenCenterVisibleAreaIsYES {
+ // Given
+ MDCChipView *chip = [[MDCChipView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)];
+ chip.titleLabel.text = @"Chip";
+
+ // When
+ chip.centerVisibleArea = YES;
+
+ // Then
+ CGSize visibleAreaSize = [chip sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)];
+ CGFloat verticalInsets = 50 - visibleAreaSize.height;
+ CGFloat horizontalInsets = 300 - visibleAreaSize.width;
+ CGFloat topInsets = MDCCeil(verticalInsets * 0.5f);
+ CGFloat bottomInsets = verticalInsets - topInsets;
+ CGFloat leftInsets = MDCCeil(horizontalInsets * 0.5f);
+ CGFloat rightInsets = horizontalInsets - leftInsets;
+ UIEdgeInsets expectedVisibleAreaInsets =
+ UIEdgeInsetsMake(topInsets, leftInsets, bottomInsets, rightInsets);
+ XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(chip.visibleAreaInsets, expectedVisibleAreaInsets));
+}
+
- (void)forceAutoLayoutUpdateForView:(UIView *)view {
[view setNeedsLayout];
[view layoutIfNeeded];
diff --git a/components/CollectionCells/src/MDCCollectionViewCell.m b/components/CollectionCells/src/MDCCollectionViewCell.m
index ef9f7b61037..cbcbdc6dbbd 100644
--- a/components/CollectionCells/src/MDCCollectionViewCell.m
+++ b/components/CollectionCells/src/MDCCollectionViewCell.m
@@ -368,7 +368,8 @@ - (void)drawSeparatorIfNeeded {
_usesCellSeparatorHiddenOverride ? _shouldHideSeparator : _attr.shouldHideSeparators;
UIEdgeInsets separatorInset =
_usesCellSeparatorInsetOverride ? _separatorInset : _attr.separatorInset;
- BOOL isBottom = _attr.sectionOrdinalPosition & MDCCollectionViewOrdinalPositionVerticalBottom;
+ BOOL isBottom =
+ (_attr.sectionOrdinalPosition & MDCCollectionViewOrdinalPositionVerticalBottom) ? YES : NO;
BOOL isGrid = _attr.isGridLayout;
BOOL hideSeparator = isBottom || isHidden || isGrid;
diff --git a/components/Collections/src/private/MDCCollectionViewStyler.m b/components/Collections/src/private/MDCCollectionViewStyler.m
index 8a1e868301a..f36c78bcab1 100644
--- a/components/Collections/src/private/MDCCollectionViewStyler.m
+++ b/components/Collections/src/private/MDCCollectionViewStyler.m
@@ -492,8 +492,10 @@ - (UIImage *)backgroundImageForCellLayoutAttributes:(MDCCollectionViewLayoutAttr
[attr.representedElementKind isEqualToString:UICollectionElementKindSectionFooter];
BOOL isDecorationView =
attr.representedElementCategory == UICollectionElementCategoryDecorationView;
- BOOL isTop = attr.sectionOrdinalPosition & MDCCollectionViewOrdinalPositionVerticalTop;
- BOOL isBottom = attr.sectionOrdinalPosition & MDCCollectionViewOrdinalPositionVerticalBottom;
+ BOOL isTop =
+ (attr.sectionOrdinalPosition & MDCCollectionViewOrdinalPositionVerticalTop) ? YES : NO;
+ BOOL isBottom =
+ (attr.sectionOrdinalPosition & MDCCollectionViewOrdinalPositionVerticalBottom) ? YES : NO;
MDCCollectionViewCellStyle cellStyle = [self cellStyleAtSectionIndex:attr.indexPath.section];
BOOL isCardStyle = cellStyle == MDCCollectionViewCellStyleCard;
diff --git a/components/LibraryInfo/src/MDCLibraryInfo.m b/components/LibraryInfo/src/MDCLibraryInfo.m
index 132e4d20f18..8b634b1388b 100644
--- a/components/LibraryInfo/src/MDCLibraryInfo.m
+++ b/components/LibraryInfo/src/MDCLibraryInfo.m
@@ -19,7 +19,7 @@
// This string is updated automatically as a part of the release process and should not be edited
// manually. Do not rename this constant or change the formatting without updating the release
// scripts.
-static NSString* const kMDCLibraryInfoVersionString = @"112.1.0";
+static NSString* const kMDCLibraryInfoVersionString = @"113.0.0";
@implementation MDCLibraryInfo
diff --git a/components/LibraryInfo/tests/unit/LibraryInfoTests.m b/components/LibraryInfo/tests/unit/LibraryInfoTests.m
index 1618de59227..94f9488f353 100644
--- a/components/LibraryInfo/tests/unit/LibraryInfoTests.m
+++ b/components/LibraryInfo/tests/unit/LibraryInfoTests.m
@@ -26,7 +26,7 @@ - (void)testVersionFormat {
// Given
// This regex pattern does the following:
- // Accept: "112.1.0", etc.
+ // Accept: "113.0.0", etc.
// Reject: "0.0.0", "1.2", "1", "-1.2.3", "Hi, I'm a version 1.2.3", "1.2.3 is my version", etc.
//
// Note the major version must be >= 1 since "0.0.0" is used as the version when something goes
diff --git a/components/NavigationBar/tests/snapshot/MDCNavigationBarSnapshotTests.m b/components/NavigationBar/tests/snapshot/MDCNavigationBarSnapshotTests.m
index 0c32101bb72..5a13c793a81 100644
--- a/components/NavigationBar/tests/snapshot/MDCNavigationBarSnapshotTests.m
+++ b/components/NavigationBar/tests/snapshot/MDCNavigationBarSnapshotTests.m
@@ -85,9 +85,7 @@ - (void)setUp {
action:NULL];
UIImage *backImage = [MDCIcons imageFor_ic_arrow_back];
- if (@available(iOS 9.0, *)) {
- backImage = [backImage imageFlippedForRightToLeftLayoutDirection];
- }
+ backImage = [backImage imageFlippedForRightToLeftLayoutDirection];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithImage:backImage
style:UIBarButtonItemStylePlain
target:nil
diff --git a/components/NavigationDrawer/src/private/MDCBottomDrawerContainerViewController.m b/components/NavigationDrawer/src/private/MDCBottomDrawerContainerViewController.m
index 7a4fb863093..c1e5ba248bb 100644
--- a/components/NavigationDrawer/src/private/MDCBottomDrawerContainerViewController.m
+++ b/components/NavigationDrawer/src/private/MDCBottomDrawerContainerViewController.m
@@ -280,9 +280,11 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
CGPoint contentOffset = [(NSValue *)[change objectForKey:NSKeyValueChangeNewKey] CGPointValue];
CGPoint oldContentOffset =
[(NSValue *)[change objectForKey:NSKeyValueChangeOldKey] CGPointValue];
- self.scrollViewIsDraggedToBottom = contentOffset.y == oldContentOffset.y
- ? self.scrollViewIsDraggedToBottom
- : contentOffset.y < oldContentOffset.y;
+ self.scrollViewIsDraggedToBottom =
+ (contentOffset.y == oldContentOffset.y ? self.scrollViewIsDraggedToBottom
+ : contentOffset.y < oldContentOffset.y)
+ ? YES
+ : NO;
// The normalized content offset takes the content offset and updates it if using the
// performance logic that comes with setting the tracking scroll view. The reason we update
diff --git a/components/Ripple/examples/CardCellsWithRippleExample.swift b/components/Ripple/examples/CardCellsWithRippleExample.swift
index 4a87aced13d..7e933ba57ee 100644
--- a/components/Ripple/examples/CardCellsWithRippleExample.swift
+++ b/components/Ripple/examples/CardCellsWithRippleExample.swift
@@ -13,23 +13,25 @@
// limitations under the License.
import UIKit
-
+import MaterialComponents.MaterialCards_Theming
import MaterialComponents.MaterialColorScheme
import MaterialComponents.MaterialContainerScheme
import MaterialComponents.MaterialTypographyScheme
-import MaterialComponents.MaterialCards_Theming
class CardCellsWithRippleExample: UIViewController,
UICollectionViewDelegate,
UICollectionViewDataSource,
- UICollectionViewDelegateFlowLayout {
+ UICollectionViewDelegateFlowLayout
+{
enum ToggleMode: Int {
- case edit = 1, reorder
+ case edit = 1
+ case reorder
}
- let collectionView = UICollectionView(frame: .zero,
- collectionViewLayout: UICollectionViewFlowLayout())
+ let collectionView = UICollectionView(
+ frame: .zero,
+ collectionViewLayout: UICollectionViewFlowLayout())
var toggle = ToggleMode.edit
@objc var containerScheme: MDCContainerScheming
@@ -64,13 +66,15 @@ class CardCellsWithRippleExample: UIViewController,
collectionView.allowsMultipleSelection = true
view.addSubview(collectionView)
- navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Reorder",
- style: .plain,
- target: self,
- action: #selector(toggleModes))
+ navigationItem.rightBarButtonItem = UIBarButtonItem(
+ title: "Reorder",
+ style: .plain,
+ target: self,
+ action: #selector(toggleModes))
- let longPressGesture = UILongPressGestureRecognizer(target: self,
- action: #selector(reorderCards(gesture:)))
+ let longPressGesture = UILongPressGestureRecognizer(
+ target: self,
+ action: #selector(reorderCards(gesture:)))
longPressGesture.cancelsTouchesInView = false
collectionView.addGestureRecognizer(longPressGesture)
@@ -80,7 +84,8 @@ class CardCellsWithRippleExample: UIViewController,
collectionView.leftAnchor.constraint(equalTo: guide.leftAnchor),
collectionView.rightAnchor.constraint(equalTo: guide.rightAnchor),
collectionView.topAnchor.constraint(equalTo: view.topAnchor),
- collectionView.bottomAnchor.constraint(equalTo: guide.bottomAnchor)])
+ collectionView.bottomAnchor.constraint(equalTo: guide.bottomAnchor),
+ ])
collectionView.contentInsetAdjustmentBehavior = .always
} else {
preiOS11Constraints()
@@ -90,14 +95,18 @@ class CardCellsWithRippleExample: UIViewController,
}
func preiOS11Constraints() {
- self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[view]|",
- options: [],
- metrics: nil,
- views: ["view": collectionView]))
- self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[view]|",
- options: [],
- metrics: nil,
- views: ["view": collectionView]))
+ self.view.addConstraints(
+ NSLayoutConstraint.constraints(
+ withVisualFormat: "H:|[view]|",
+ options: [],
+ metrics: nil,
+ views: ["view": collectionView]))
+ self.view.addConstraints(
+ NSLayoutConstraint.constraints(
+ withVisualFormat: "V:|[view]|",
+ options: [],
+ metrics: nil,
+ views: ["view": collectionView]))
}
func updateTitle() {
@@ -122,8 +131,10 @@ class CardCellsWithRippleExample: UIViewController,
collectionView.reloadData()
}
- func collectionView(_ collectionView: UICollectionView,
- cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ cellForItemAt indexPath: IndexPath
+ ) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath)
guard let cardCell = cell as? MDCCardCollectionCell else { return cell }
@@ -148,57 +159,73 @@ class CardCellsWithRippleExample: UIViewController,
return 1
}
- func collectionView(_ collectionView: UICollectionView,
- numberOfItemsInSection section: Int) -> Int {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ numberOfItemsInSection section: Int
+ ) -> Int {
return 30
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- sizeForItemAt indexPath: IndexPath) -> CGSize {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ sizeForItemAt indexPath: IndexPath
+ ) -> CGSize {
let cardSize = (collectionView.bounds.size.width / 3) - 12
return CGSize(width: cardSize, height: cardSize)
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- insetForSectionAt section: Int) -> UIEdgeInsets {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ insetForSectionAt section: Int
+ ) -> UIEdgeInsets {
return UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8)
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- minimumLineSpacingForSectionAt section: Int) -> CGFloat {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ minimumLineSpacingForSectionAt section: Int
+ ) -> CGFloat {
return 8
}
- func collectionView(_ collectionView: UICollectionView,
- layout collectionViewLayout: UICollectionViewLayout,
- minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ layout collectionViewLayout: UICollectionViewLayout,
+ minimumInteritemSpacingForSectionAt section: Int
+ ) -> CGFloat {
return 8
}
- func collectionView(_ collectionView: UICollectionView,
- canMoveItemAt indexPath: IndexPath) -> Bool {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ canMoveItemAt indexPath: IndexPath
+ ) -> Bool {
return toggle == .reorder
}
- func collectionView(_ collectionView: UICollectionView,
- moveItemAt sourceIndexPath: IndexPath,
- to destinationIndexPath: IndexPath) {
+ func collectionView(
+ _ collectionView: UICollectionView,
+ moveItemAt sourceIndexPath: IndexPath,
+ to destinationIndexPath: IndexPath
+ ) {
}
- @available(iOS 9.0, *)
@objc func reorderCards(gesture: UILongPressGestureRecognizer) {
- switch(gesture.state) {
+ switch gesture.state {
case .began:
- guard let selectedIndexPath = collectionView.indexPathForItem(at:
- gesture.location(in: collectionView)) else { break }
+ guard
+ let selectedIndexPath = collectionView.indexPathForItem(
+ at:
+ gesture.location(in: collectionView))
+ else { break }
let cell = collectionView.cellForItem(at: selectedIndexPath)
guard let cardCell = cell as? MDCCardCollectionCell else { break }
collectionView.beginInteractiveMovementForItem(at: selectedIndexPath)
- if (toggle == .reorder) {
+ if toggle == .reorder {
cardCell.isDragged = true
}
case .changed:
diff --git a/components/Slider/examples/SliderCollectionViewController.m b/components/Slider/examples/SliderCollectionViewController.m
index b1f6555fcbf..f5e69f28695 100644
--- a/components/Slider/examples/SliderCollectionViewController.m
+++ b/components/Slider/examples/SliderCollectionViewController.m
@@ -22,6 +22,7 @@
static NSString *const kReusableIdentifierItem = @"sliderItemCellIdentifier";
static CGFloat const kSliderHorizontalMargin = 16;
static CGFloat const kSliderVerticalMargin = 12;
+static CGFloat const kSliderMinimumTouchSize = 48;
@interface MDCSliderModel : NSObject
@@ -160,11 +161,13 @@ - (void)layoutSubviews {
_label.frame = UIEdgeInsetsInsetRect(labelFrame, safeArea);
- CGSize intrinsicSize = [_slider intrinsicContentSize];
+ CGSize sliderSize = [_slider intrinsicContentSize];
+ sliderSize.width = MAX(kSliderMinimumTouchSize, sliderSize.width);
+ sliderSize.height = MAX(kSliderMinimumTouchSize, sliderSize.height);
CGRect sliderFrame = CGRectMake(
kSliderHorizontalMargin,
- self.contentView.frame.size.height - kSliderVerticalMargin - intrinsicSize.height,
- self.contentView.frame.size.width - (2 * kSliderHorizontalMargin), intrinsicSize.height);
+ self.contentView.frame.size.height - kSliderVerticalMargin - sliderSize.height,
+ self.contentView.frame.size.width - (2 * kSliderHorizontalMargin), sliderSize.height);
_slider.frame = UIEdgeInsetsInsetRect(sliderFrame, safeArea);
}
@@ -198,7 +201,7 @@ - (void)invalidateLayout {
}
- (CGSize)itemSize {
- return CGSizeMake(self.collectionView.bounds.size.width, 80);
+ return CGSizeMake(self.collectionView.bounds.size.width, 100);
}
- (CGFloat)minimumInteritemSpacing {
diff --git a/components/Slider/tests/unit/SliderRippleTests.m b/components/Slider/tests/unit/SliderRippleTests.m
index e8d687df6ac..542718c9963 100644
--- a/components/Slider/tests/unit/SliderRippleTests.m
+++ b/components/Slider/tests/unit/SliderRippleTests.m
@@ -74,10 +74,12 @@ - (void)testRippleIsEnabledAndThatItsPropertiesAreSetUpCorrectlyWhenRippleBehavi
// Then
XCTAssertNil(self.slider.thumbTrack.touchController.defaultInkView.superview);
XCTAssertEqual(self.slider.thumbTrack.rippleView.superview, self.slider.thumbTrack.thumbView);
- CGRect thumbViewBounds = CGRectStandardize(self.slider.thumbTrack.thumbView.bounds);
+ CGFloat thumbViewRadius = self.slider.thumbTrack.thumbRadius;
+ CGSize visibleThumbViewSize = CGSizeMake(2 * thumbViewRadius, 2 * thumbViewRadius);
CGRect rippleBounds = CGRectStandardize(self.slider.thumbTrack.rippleView.bounds);
- XCTAssertTrue(CGRectEqualToRect(thumbViewBounds, rippleBounds), @"%@ is not equal to %@",
- NSStringFromCGRect(thumbViewBounds), NSStringFromCGRect(rippleBounds));
+ XCTAssertTrue(CGSizeEqualToSize(visibleThumbViewSize, rippleBounds.size),
+ @"%@ is not equal to %@", NSStringFromCGSize(visibleThumbViewSize),
+ NSStringFromCGSize(rippleBounds.size));
}
/**
diff --git a/components/Snackbar/README.md b/components/Snackbar/README.md
index 88f9d38d4bf..43e8e9fca88 100644
--- a/components/Snackbar/README.md
+++ b/components/Snackbar/README.md
@@ -113,7 +113,7 @@ import MaterialComponents.MaterialSnackbar
Displaying a snackbar requires using two classes: MDCSnackbarManager and MDCSnackbarMessage.
First, create an instance of MDCSnackbarMessage and provide a string to display to the user. Next,
-pass the MDCSnackbarMessage to the MDCSnackbarManager with the static showMessage method. This will
+pass the MDCSnackbarMessage to the MDCSnackbarManager.defaultManager with the static showMessage method. This will
automatically construct an MDCSnackbarMessageView and appropriate overlay views so the snackbar is
visible to the user.
@@ -135,7 +135,7 @@ MDCSnackbarManager.show(message)
```objc
MDCSnackbarMessage *message = [[MDCSnackbarMessage alloc] init];
message.text = @"How much wood would a woodchuck chuck if a woodchuck could chuck wood?";
-[MDCSnackbarManager showMessage:message];
+[MDCSnackbarManager.defaultManager showMessage:message];
```
@@ -165,7 +165,7 @@ MDCSnackbarMessageAction *action = [[MDCSnackbarMessageAction alloc] init];
void (^actionHandler)() = ^() {
MDCSnackbarMessage *answerMessage = [[MDCSnackbarMessage alloc] init];
answerMessage.text = @"A lot";
- [MDCSnackbarManager showMessage:answerMessage];
+ [MDCSnackbarManager.defaultManager showMessage:answerMessage];
};
action.handler = actionHandler;
action.title = @"Answer";
diff --git a/components/Snackbar/docs/README.md b/components/Snackbar/docs/README.md
index 305921a093f..ba7ffeea564 100644
--- a/components/Snackbar/docs/README.md
+++ b/components/Snackbar/docs/README.md
@@ -43,7 +43,7 @@ method with the suspension token, then messages will resume being displayed.
Displaying a snackbar requires using two classes: MDCSnackbarManager and MDCSnackbarMessage.
First, create an instance of MDCSnackbarMessage and provide a string to display to the user. Next,
-pass the MDCSnackbarMessage to the MDCSnackbarManager with the static showMessage method. This will
+pass the MDCSnackbarMessage to the MDCSnackbarManager.defaultManager with the static showMessage method. This will
automatically construct an MDCSnackbarMessageView and appropriate overlay views so the snackbar is
visible to the user.
diff --git a/components/Snackbar/docs/typical-use-display-a-message-with-action.md b/components/Snackbar/docs/typical-use-display-a-message-with-action.md
index f08ff70f937..f784fb5e904 100644
--- a/components/Snackbar/docs/typical-use-display-a-message-with-action.md
+++ b/components/Snackbar/docs/typical-use-display-a-message-with-action.md
@@ -22,7 +22,7 @@ MDCSnackbarMessageAction *action = [[MDCSnackbarMessageAction alloc] init];
void (^actionHandler)() = ^() {
MDCSnackbarMessage *answerMessage = [[MDCSnackbarMessage alloc] init];
answerMessage.text = @"A lot";
- [MDCSnackbarManager showMessage:answerMessage];
+ [MDCSnackbarManager.defaultManager showMessage:answerMessage];
};
action.handler = actionHandler;
action.title = @"Answer";
diff --git a/components/Snackbar/docs/typical-use-display-a-message.md b/components/Snackbar/docs/typical-use-display-a-message.md
index 7264cf25e54..037757fff76 100644
--- a/components/Snackbar/docs/typical-use-display-a-message.md
+++ b/components/Snackbar/docs/typical-use-display-a-message.md
@@ -14,6 +14,6 @@ MDCSnackbarManager.show(message)
```objc
MDCSnackbarMessage *message = [[MDCSnackbarMessage alloc] init];
message.text = @"How much wood would a woodchuck chuck if a woodchuck could chuck wood?";
-[MDCSnackbarManager showMessage:message];
+[MDCSnackbarManager.defaultManager showMessage:message];
```
diff --git a/components/Snackbar/examples/SnackbarInputAccessoryViewController.m b/components/Snackbar/examples/SnackbarInputAccessoryViewController.m
index b74e272b788..d80057ea7fc 100644
--- a/components/Snackbar/examples/SnackbarInputAccessoryViewController.m
+++ b/components/Snackbar/examples/SnackbarInputAccessoryViewController.m
@@ -64,7 +64,7 @@ - (void)showSnackbarWithAction {
MDCSnackbarMessageAction *action = [[MDCSnackbarMessageAction alloc] init];
action.title = @"Tap Me";
message.action = action;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
@end
diff --git a/components/Snackbar/examples/SnackbarKeyboardExample.swift b/components/Snackbar/examples/SnackbarKeyboardExample.swift
index 76d20aecb43..d2bc285aace 100644
--- a/components/Snackbar/examples/SnackbarKeyboardExample.swift
+++ b/components/Snackbar/examples/SnackbarKeyboardExample.swift
@@ -13,9 +13,8 @@
// limitations under the License.
import UIKit
-
import MaterialComponents.MaterialButtons
-import MaterialComponents.MaterialButtons_Theming
+import MaterialComponents.MaterialButtons_Theming
import MaterialComponents.MaterialSnackbar
class SnackbarKeyboardExample: UIViewController {
@@ -33,7 +32,7 @@ class SnackbarKeyboardExample: UIViewController {
lazy var textField: UITextField = {
let textField = UITextField()
textField.borderStyle = .roundedRect
- textField.returnKeyType = .done;
+ textField.returnKeyType = .done
textField.delegate = self
return textField
}()
@@ -66,7 +65,7 @@ class SnackbarKeyboardExample: UIViewController {
}
@objc func showSnackbarButtonTapped() {
- MDCSnackbarManager.show(MDCSnackbarMessage(text: "Hello!"))
+ MDCSnackbarManager.default.show(MDCSnackbarMessage(text: "Hello!"))
}
}
diff --git a/components/Snackbar/examples/SnackbarOverlayViewExample.m b/components/Snackbar/examples/SnackbarOverlayViewExample.m
index 7c07247148a..1a2a39d573d 100644
--- a/components/Snackbar/examples/SnackbarOverlayViewExample.m
+++ b/components/Snackbar/examples/SnackbarOverlayViewExample.m
@@ -88,7 +88,7 @@ - (void)viewDidLoad {
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
- [MDCSnackbarManager setBottomOffset:0];
+ [MDCSnackbarManager.defaultManager setBottomOffset:0];
}
- (void)toggleModes {
@@ -118,7 +118,7 @@ - (void)showSnackbar {
NSString *text = @"Snackbar Message";
MDCSnackbarMessage *message = [MDCSnackbarMessage messageWithText:text];
message.duration = 5;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)toggleBottomBar {
@@ -136,7 +136,7 @@ - (void)toggleBottomBar {
animations:^{
self.bottomBar.center = CGPointMake(self.bottomBar.center.x,
self.bottomBar.center.y + translation);
- [MDCSnackbarManager setBottomOffset:bottomOffset];
+ [MDCSnackbarManager.defaultManager setBottomOffset:bottomOffset];
}];
}
diff --git a/components/Snackbar/examples/SnackbarSimpleExample.m b/components/Snackbar/examples/SnackbarSimpleExample.m
index 226d9229849..45f854d1ce5 100644
--- a/components/Snackbar/examples/SnackbarSimpleExample.m
+++ b/components/Snackbar/examples/SnackbarSimpleExample.m
@@ -73,7 +73,7 @@ - (void)toggleDynamicType {
} else {
[self.navigationItem.rightBarButtonItems.lastObject setTitle:@"DT Off"];
}
- [MDCSnackbarManager mdc_setAdjustsFontForContentSizeCategory:_dynamicType];
+ [MDCSnackbarManager.defaultManager mdc_setAdjustsFontForContentSizeCategory:_dynamicType];
}
#pragma mark - Event Handling
@@ -82,7 +82,7 @@ - (void)showSimpleSnackbar:(id)sender {
MDCSnackbarMessage *message = [[MDCSnackbarMessage alloc] init];
message.text = @"Snackbar Message";
message.focusOnShow = YES;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showSnackbarWithAction:(id)sender {
@@ -92,7 +92,7 @@ - (void)showSnackbarWithAction:(id)sender {
action.title = @"Tap Me";
message.action = action;
message.enableRippleBehavior = YES;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showLongSnackbarMessage:(id)sender {
@@ -102,13 +102,13 @@ - (void)showLongSnackbarMessage:(id)sender {
MDCSnackbarMessageActionHandler actionHandler = ^() {
MDCSnackbarMessage *answerMessage = [[MDCSnackbarMessage alloc] init];
answerMessage.text = @"The sky was cloudless and of a deep dark blue.";
- [MDCSnackbarManager showMessage:answerMessage];
+ [MDCSnackbarManager.defaultManager showMessage:answerMessage];
};
action.handler = actionHandler;
action.title = @"Action";
message.action = action;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showBoldSnackbar:(id)sender {
@@ -121,7 +121,7 @@ - (void)showBoldSnackbar:(id)sender {
initWithString:@" go where no one has gone before."]];
message.attributedText = text;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showColorThemedSnackbar:(id)sender {
@@ -130,12 +130,12 @@ - (void)showColorThemedSnackbar:(id)sender {
MDCSnackbarMessageAction *action = [[MDCSnackbarMessageAction alloc] init];
action.title = @"Tap Me";
message.action = action;
- [MDCSnackbarManager setButtonTitleColor:MDCPalette.purplePalette.tint400
- forState:UIControlStateNormal];
- [MDCSnackbarManager setButtonTitleColor:MDCPalette.purplePalette.tint700
- forState:UIControlStateHighlighted];
+ [MDCSnackbarManager.defaultManager setButtonTitleColor:MDCPalette.purplePalette.tint400
+ forState:UIControlStateNormal];
+ [MDCSnackbarManager.defaultManager setButtonTitleColor:MDCPalette.purplePalette.tint700
+ forState:UIControlStateHighlighted];
MDCSnackbarManager.messageTextColor = MDCPalette.greenPalette.tint500;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showCustomizedSnackbar:(id)sender {
@@ -153,14 +153,14 @@ - (void)showCustomizedSnackbar:(id)sender {
action.title = @"Fancy";
message.action = action;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showDecustomizedSnackbar:(id)sender {
MDCSnackbarManager.messageFont = nil;
MDCSnackbarManager.buttonFont = nil;
- [MDCSnackbarManager setButtonTitleColor:nil forState:UIControlStateNormal];
- [MDCSnackbarManager setButtonTitleColor:nil forState:UIControlStateHighlighted];
+ [MDCSnackbarManager.defaultManager setButtonTitleColor:nil forState:UIControlStateNormal];
+ [MDCSnackbarManager.defaultManager setButtonTitleColor:nil forState:UIControlStateHighlighted];
MDCSnackbarManager.messageTextColor = nil;
MDCSnackbarMessage *message = [[MDCSnackbarMessage alloc] init];
@@ -169,7 +169,7 @@ - (void)showDecustomizedSnackbar:(id)sender {
action.title = @"Okay";
message.action = action;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showCustomizedSnackbarWithActionUsingBlock:(id)sender {
@@ -188,7 +188,7 @@ - (void)showCustomizedSnackbarWithActionUsingBlock:(id)sender {
[button setTitleColor:UIColor.whiteColor forState:UIControlStateHighlighted];
}
};
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showNonTransientSnackbar:(id)sender {
@@ -196,7 +196,7 @@ - (void)showNonTransientSnackbar:(id)sender {
message.text = @"Snackbar Message";
message.automaticallyDismisses = NO;
message.enableRippleBehavior = YES;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
- (void)showSimpleSnackbarOnCustomPresentationHostView:(id)sender {
@@ -204,7 +204,7 @@ - (void)showSimpleSnackbarOnCustomPresentationHostView:(id)sender {
message.text = @"Snackbar Message";
message.focusOnShow = YES;
message.presentationHostViewOverride = self.collectionView;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
#pragma mark - UICollectionView
diff --git a/components/Snackbar/examples/SnackbarSuspensionExample.m b/components/Snackbar/examples/SnackbarSuspensionExample.m
index ead96049db1..9963804620c 100644
--- a/components/Snackbar/examples/SnackbarSuspensionExample.m
+++ b/components/Snackbar/examples/SnackbarSuspensionExample.m
@@ -67,34 +67,34 @@ - (void)showMessageWithPrefix:(NSString *)prefix category:(NSString *)category {
[attributedMessage appendAttributedString:attributedStringID];
message.attributedText = attributedMessage;
message.category = category;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
}
#pragma mark - Suspend/Resume
- (void)setSuspendedGroupA:(BOOL)suspended {
if (suspended && self.groupAToken == nil) {
- self.groupAToken = [MDCSnackbarManager suspendMessagesWithCategory:kCategoryA];
+ self.groupAToken = [MDCSnackbarManager.defaultManager suspendMessagesWithCategory:kCategoryA];
} else if (!suspended && self.groupAToken != nil) {
- [MDCSnackbarManager resumeMessagesWithToken:self.groupAToken];
+ [MDCSnackbarManager.defaultManager resumeMessagesWithToken:self.groupAToken];
self.groupAToken = nil;
}
}
- (void)setSuspendedGroupB:(BOOL)suspended {
if (suspended && self.groupBToken == nil) {
- self.groupBToken = [MDCSnackbarManager suspendMessagesWithCategory:kCategoryB];
+ self.groupBToken = [MDCSnackbarManager.defaultManager suspendMessagesWithCategory:kCategoryB];
} else if (!suspended && self.groupBToken != nil) {
- [MDCSnackbarManager resumeMessagesWithToken:self.groupBToken];
+ [MDCSnackbarManager.defaultManager resumeMessagesWithToken:self.groupBToken];
self.groupBToken = nil;
}
}
- (void)setSuspendedAllMessages:(BOOL)suspended {
if (suspended && self.allMessagesToken == nil) {
- self.allMessagesToken = [MDCSnackbarManager suspendAllMessages];
+ self.allMessagesToken = [MDCSnackbarManager.defaultManager suspendAllMessages];
} else if (!suspended && self.allMessagesToken != nil) {
- [MDCSnackbarManager resumeMessagesWithToken:self.allMessagesToken];
+ [MDCSnackbarManager.defaultManager resumeMessagesWithToken:self.allMessagesToken];
self.allMessagesToken = nil;
}
}
diff --git a/components/Snackbar/src/MDCSnackbarManager.h b/components/Snackbar/src/MDCSnackbarManager.h
index cbbc5cb50e5..44d7f932e00 100644
--- a/components/Snackbar/src/MDCSnackbarManager.h
+++ b/components/Snackbar/src/MDCSnackbarManager.h
@@ -32,7 +32,7 @@
The style and location of the message can vary depending on the configuration of the message to be
shown. This class will queue repeated calls to @c showMessage: and show them at the appropriate
time, once previous messages have been dismissed. This class is thread-safe as long as the messages
- given to MDCSnackbarManager are not mutated after being passed to @c showMessage:
+ given to MDCSnackbarManager.defaultManager are not mutated after being passed to @c showMessage:
Snackbars prefer an application's main window is a subclass of @c MDCOverlayWindow. When a standard
UIWindow is used an attempt is made to find the top-most view controller in the view hierarchy.
@@ -67,15 +67,15 @@
- (void)showMessage:(nullable MDCSnackbarMessage *)message;
/**
- MDCSnackbarManager will display the messages in this view.
+ MDCSnackbarManager.defaultManager will display the messages in this view.
Call this method to choose where in the view hierarchy Snackbar messages will be presented. It is
only necessary to provide a host view if the default behavior is unable to find one on it's own,
- most commonly when using MDCSnackbarManager inside an application extension. By default, if you use
- MDCSnackbarManager without calling @c setPresentationHostView, the manager will attempt to find a
- suitable view by stepping through the application windows. Explicitly providing a host view is only
- required if you need to manually manage the view hierarchy, or are inside a UIApplication
- extension.
+ most commonly when using MDCSnackbarManager.defaultManager inside an application extension. By
+ default, if you use MDCSnackbarManager.defaultManager without calling @c setPresentationHostView,
+ the manager will attempt to find a suitable view by stepping through the application windows.
+ Explicitly providing a host view is only required if you need to manually manage the view
+ hierarchy, or are inside a UIApplication extension.
@note This method must be called from the main thread.
@note Calling setPresentationHostView will not change the parent of the currently visible message.
@@ -160,11 +160,6 @@
/** The elevation for the Snackbar message view. */
@property(nonatomic, assign) MDCShadowElevation messageElevation;
-/**
- The color for the message text in the Snackbar message view.
- */
-@property(nonatomic, strong, nullable) UIColor *messageTextColor;
-
/**
The font for the message text in the Snackbar message view.
*/
@@ -262,7 +257,8 @@
@property(nonatomic, assign) BOOL shouldEnableAccessibilityViewIsModal;
/**
- The delegate for MDCSnackbarManager through which it may inform of snackbar presentation updates.
+ The delegate for MDCSnackbarManager.defaultManager through which it may inform of snackbar
+ presentation updates.
*/
@property(nonatomic, weak, nullable) id delegate;
@@ -294,11 +290,6 @@
@interface MDCSnackbarManager (ToBeDeprecated)
-/**
- The @c alignment property of the @c defaultManager instance.
- */
-@property(class, nonatomic, assign) MDCSnackbarAlignment alignment;
-
/**
Calls @c -showMessage: on the @c defaultManager instance.
*/
@@ -341,54 +332,79 @@
+ (void)resumeMessagesWithToken:(nullable id)token;
/**
- Bound to @c snackbarMessageViewBackgroundColor on the @c defaultManager instance.
+ Calls @c -setButtonTitleColor:forState: on the @c defaultManager instance.
*/
-@property(class, nonatomic, strong, nullable) UIColor *snackbarMessageViewBackgroundColor;
++ (void)setButtonTitleColor:(nullable UIColor *)titleColor forState:(UIControlState)state;
/**
- Bound to @c snackbarMessageViewShadowColor on the @c defaultManager instance.
+ Bound to @c messageTextColor on the @c defaultManager instance.
*/
-@property(class, nonatomic, strong, nullable) UIColor *snackbarMessageViewShadowColor;
+@property(class, nonatomic, strong, nullable) UIColor *messageTextColor;
/**
- Bound to @c messageTextColor on the @c defaultManager instance.
+ Bound to @c mdc_adjustsFontForContentSizeCategory on the @c defaultManager instance.
*/
-@property(class, nonatomic, strong, nullable) UIColor *messageTextColor;
+@property(class, nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:)
+ BOOL mdc_adjustsFontForContentSizeCategory;
/**
- Bound to @c messageFont on the @c defaultManager instance.
+ Bound to @c delegate on the @c defaultManager instance.
*/
-@property(class, nonatomic, strong, nullable) UIFont *messageFont;
+@property(class, nonatomic, weak, nullable) id delegate;
+
+@end
+
+@interface MDCSnackbarManager (Deprecated)
/**
- Bound to @c buttonFont on the @c defaultManager instance.
+ The @c alignment property of the @c defaultManager instance.
*/
-@property(class, nonatomic, strong, nullable) UIFont *buttonFont;
+@property(class, nonatomic, assign) MDCSnackbarAlignment alignment __deprecated_msg(
+ "Use MDCSnackbarManager.defaultManager.alignment instead.");
/**
- Bound to @c shouldApplyStyleChangesToVisibleSnackbars on the @c defaultManager instance.
+ Bound to @c snackbarMessageViewBackgroundColor on the @c defaultManager instance.
*/
-@property(class, nonatomic, assign) BOOL shouldApplyStyleChangesToVisibleSnackbars;
+@property(class, nonatomic, strong, nullable)
+ UIColor *snackbarMessageViewBackgroundColor __deprecated_msg(
+ "Use MDCSnackbarManager.defaultManager.snackbarMessageViewBackgroundColor instead.");
/**
- Calls @c -buttonTitleColorForState: on the @c defaultManager instance.
+ Bound to @c snackbarMessageViewShadowColor on the @c defaultManager instance.
*/
-+ (nullable UIColor *)buttonTitleColorForState:(UIControlState)state;
+@property(class, nonatomic, strong, nullable)
+ UIColor *snackbarMessageViewShadowColor __deprecated_msg(
+ "Use MDCSnackbarManager.defaultManager.snackbarMessageViewShadowColor instead.");
/**
- Calls @c -setButtonTitleColor:forState: on the @c defaultManager instance.
+ The color for the message text in the Snackbar message view.
*/
-+ (void)setButtonTitleColor:(nullable UIColor *)titleColor forState:(UIControlState)state;
+@property(nonatomic, strong, nullable) UIColor *messageTextColor __deprecated_msg(
+ "Use MDCSnackbarManager.defaultManager.messageTextColor instead.");
/**
- Bound to @c mdc_adjustsFontForContentSizeCategory on the @c defaultManager instance.
+ Bound to @c messageFont on the @c defaultManager instance.
*/
-@property(class, nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:)
- BOOL mdc_adjustsFontForContentSizeCategory;
+@property(class, nonatomic, strong, nullable) UIFont *messageFont __deprecated_msg(
+ "Use MDCSnackbarManager.defaultManager.messageFont instead.");
/**
- Bound to @c delegate on the @c defaultManager instance.
+ Bound to @c buttonFont on the @c defaultManager instance.
*/
-@property(class, nonatomic, weak, nullable) id delegate;
+@property(class, nonatomic, strong, nullable)
+ UIFont *buttonFont __deprecated_msg("Use MDCSnackbarManager.defaultManager.buttonFont instead.")
+ ;
+
+/**
+ Bound to @c shouldApplyStyleChangesToVisibleSnackbars on the @c defaultManager instance.
+ */
+@property(class, nonatomic, assign) BOOL shouldApplyStyleChangesToVisibleSnackbars __deprecated_msg(
+ "Use MDCSnackbarManager.defaultManager.shouldApplyStyleChangesToVisibleSnackbars instead.");
+
+/**
+ Calls @c -buttonTitleColorForState: on the @c defaultManager instance.
+ */
++ (nullable UIColor *)buttonTitleColorForState:(UIControlState)state
+ __deprecated_msg("Use [MDCSnackbarManager.defaultManager buttonTitleColorForState:] instead.");
@end
diff --git a/components/Snackbar/src/MDCSnackbarManager.m b/components/Snackbar/src/MDCSnackbarManager.m
index 2743e996082..931ebb09543 100644
--- a/components/Snackbar/src/MDCSnackbarManager.m
+++ b/components/Snackbar/src/MDCSnackbarManager.m
@@ -56,8 +56,8 @@ @interface MDCSnackbarManagerInternal ()
@property(nonatomic) BOOL isVoiceOverRunningOverride;
/**
- The instance of MDCSnackbarManager that "owns" this internal manager. Used to get theming
- properties. Can be refactored away in the future.
+ The instance of MDCSnackbarManager.defaultManager that "owns" this internal manager. Used to get
+ theming properties. Can be refactored away in the future.
*/
@property(nonatomic, weak) MDCSnackbarManager *manager;
diff --git a/components/Snackbar/src/MDCSnackbarMessage.h b/components/Snackbar/src/MDCSnackbarMessage.h
index 2bef82de3f5..9d085b87bcb 100644
--- a/components/Snackbar/src/MDCSnackbarMessage.h
+++ b/components/Snackbar/src/MDCSnackbarMessage.h
@@ -214,7 +214,7 @@ extern NSString *__nonnull const MDCSnackbarMessageBoldAttributeName;
@property(nonatomic) BOOL automaticallyDismisses;
/**
- MDCSnackbarManager will display the snackbar message in this view.
+ MDCSnackbarManager.defaultManager will display the snackbar message in this view.
Call this method to choose where in the view hierarchy this specific snackbar message will be
presented. This method should be called only in cases where the default behavior is unable to find
diff --git a/components/Snackbar/tests/unit/MDCSnackbarManagerInstanceTests.m b/components/Snackbar/tests/unit/MDCSnackbarManagerInstanceTests.m
index b0eae7df7d6..5a92b866112 100644
--- a/components/Snackbar/tests/unit/MDCSnackbarManagerInstanceTests.m
+++ b/components/Snackbar/tests/unit/MDCSnackbarManagerInstanceTests.m
@@ -44,7 +44,8 @@ - (void)setUp {
NSUInteger maxState = UIControlStateNormal | UIControlStateDisabled | UIControlStateSelected |
UIControlStateHighlighted;
for (NSUInteger state = 0; state < maxState; ++state) {
- self.titleColorForState[@(state)] = [MDCSnackbarManager buttonTitleColorForState:state];
+ self.titleColorForState[@(state)] =
+ [MDCSnackbarManager.defaultManager buttonTitleColorForState:state];
}
}
@@ -55,8 +56,8 @@ - (void)tearDown {
MDCSnackbarManager.snackbarMessageViewBackgroundColor = self.snackbarMessageViewBackgroundColor;
for (NSNumber *state in self.titleColorForState.allKeys) {
if (self.titleColorForState[state] != nil) {
- [MDCSnackbarManager setButtonTitleColor:self.titleColorForState[state]
- forState:state.unsignedIntegerValue];
+ [MDCSnackbarManager.defaultManager setButtonTitleColor:self.titleColorForState[state]
+ forState:state.unsignedIntegerValue];
}
}
@@ -95,13 +96,14 @@ - (void)testClassPropertiesAssignToDefaultInstance {
MDCSnackbarManager.alignment = MDCSnackbarAlignmentLeading;
MDCSnackbarManager.buttonFont = [UIFont systemFontOfSize:72];
MDCSnackbarManager.delegate = delegate;
- [MDCSnackbarManager mdc_setAdjustsFontForContentSizeCategory:YES];
+ [MDCSnackbarManager.defaultManager mdc_setAdjustsFontForContentSizeCategory:YES];
MDCSnackbarManager.messageFont = [UIFont systemFontOfSize:66];
MDCSnackbarManager.messageTextColor = UIColor.orangeColor;
MDCSnackbarManager.shouldApplyStyleChangesToVisibleSnackbars = YES;
MDCSnackbarManager.snackbarMessageViewBackgroundColor = UIColor.brownColor;
MDCSnackbarManager.snackbarMessageViewShadowColor = UIColor.purpleColor;
- [MDCSnackbarManager setButtonTitleColor:UIColor.greenColor forState:UIControlStateDisabled];
+ [MDCSnackbarManager.defaultManager setButtonTitleColor:UIColor.greenColor
+ forState:UIControlStateDisabled];
// Then
XCTAssertEqual(manager.alignment, MDCSnackbarManager.alignment);
@@ -117,8 +119,9 @@ - (void)testClassPropertiesAssignToDefaultInstance {
MDCSnackbarManager.snackbarMessageViewBackgroundColor);
XCTAssertEqual(manager.snackbarMessageViewShadowColor,
MDCSnackbarManager.snackbarMessageViewShadowColor);
- XCTAssertEqual([manager buttonTitleColorForState:UIControlStateDisabled],
- [MDCSnackbarManager buttonTitleColorForState:UIControlStateDisabled]);
+ XCTAssertEqual(
+ [manager buttonTitleColorForState:UIControlStateDisabled],
+ [MDCSnackbarManager.defaultManager buttonTitleColorForState:UIControlStateDisabled]);
}
- (void)testInstancesDoNotSharePropertyStorage {
diff --git a/components/Snackbar/tests/unit/SnackbarManagerSwiftTests.swift b/components/Snackbar/tests/unit/SnackbarManagerSwiftTests.swift
index d54f07fe77f..19e4a82981e 100644
--- a/components/Snackbar/tests/unit/SnackbarManagerSwiftTests.swift
+++ b/components/Snackbar/tests/unit/SnackbarManagerSwiftTests.swift
@@ -18,7 +18,7 @@ import MaterialComponents.MaterialSnackbar
class SnackbarManagerSwiftTests: XCTestCase {
override func tearDown() {
- MDCSnackbarManager.dismissAndCallCompletionBlocks(withCategory: nil)
+ MDCSnackbarManager.default.dismissAndCallCompletionBlocks(withCategory: nil)
super.tearDown()
}
@@ -34,8 +34,8 @@ class SnackbarManagerSwiftTests: XCTestCase {
// Encourage the runtime to deallocate the token immediately
autoreleasepool {
- var token = MDCSnackbarManager.suspendAllMessages()
- MDCSnackbarManager.show(suspendedMessage)
+ var token = MDCSnackbarManager.default.suspendAllMessages()
+ MDCSnackbarManager.default.show(suspendedMessage)
token = nil
// When
@@ -50,14 +50,14 @@ class SnackbarManagerSwiftTests: XCTestCase {
func testHasMessagesShowingOrQueued() {
let message = MDCSnackbarMessage(text: "foo1")
message.duration = 10
- MDCSnackbarManager.show(message)
+ MDCSnackbarManager.default.show(message)
let expectation = self.expectation(description: "has_shown_message")
// We need to dispatch_async in order to assure that the assertion happens after showMessage:
// actually displays the message.
DispatchQueue.main.async {
- XCTAssertTrue(MDCSnackbarManager.hasMessagesShowingOrQueued())
+ XCTAssertTrue(MDCSnackbarManager.default.hasMessagesShowingOrQueued())
expectation.fulfill()
}
diff --git a/components/Snackbar/tests/unit/SnackbarManagerTests.m b/components/Snackbar/tests/unit/SnackbarManagerTests.m
index bbf2ff4da4b..56537c8b5d5 100644
--- a/components/Snackbar/tests/unit/SnackbarManagerTests.m
+++ b/components/Snackbar/tests/unit/SnackbarManagerTests.m
@@ -31,7 +31,7 @@ @interface SnackbarManagerTests : XCTestCase
@implementation SnackbarManagerTests
- (void)tearDown {
- [MDCSnackbarManager dismissAndCallCompletionBlocksWithCategory:nil];
+ [MDCSnackbarManager.defaultManager dismissAndCallCompletionBlocksWithCategory:nil];
[super tearDown];
}
@@ -47,8 +47,8 @@ - (void)disabled_testMessagesResumedWhenTokenIsDeallocated {
// Encourage the runtime to deallocate the token immediately
@autoreleasepool {
- id token = [MDCSnackbarManager suspendAllMessages];
- [MDCSnackbarManager showMessage:suspendedMessage];
+ id token = [MDCSnackbarManager.defaultManager suspendAllMessages];
+ [MDCSnackbarManager.defaultManager showMessage:suspendedMessage];
// When
token = nil;
@@ -61,14 +61,14 @@ - (void)disabled_testMessagesResumedWhenTokenIsDeallocated {
- (void)testHasMessagesShowingOrQueued {
MDCSnackbarMessage *message = [MDCSnackbarMessage messageWithText:@"foo1"];
message.duration = 10;
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
XCTestExpectation *expectation = [self expectationWithDescription:@"has_shown_message"];
// We need to dispatch_async in order to assure that the assertion happens after showMessage:
// actually displays the message.
dispatch_async(dispatch_get_main_queue(), ^{
- XCTAssertTrue([MDCSnackbarManager hasMessagesShowingOrQueued]);
+ XCTAssertTrue([MDCSnackbarManager.defaultManager hasMessagesShowingOrQueued]);
[expectation fulfill];
});
@@ -135,7 +135,7 @@ - (void)testTraitCollectionDidChangeCalledWhenTraitCollectionChanges {
};
// When
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
XCTestExpectation *mainQueueExpectation = [self expectationWithDescription:@"completed"];
dispatch_async(dispatch_get_main_queue(), ^{
[mainQueueExpectation fulfill];
@@ -160,7 +160,7 @@ - (void)testCurrentElevationMatchesElevationWhenElevationChanges {
MDCSnackbarManager.defaultManager.messageElevation = 4;
// When
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
XCTestExpectation *mainQueueExpectation = [self expectationWithDescription:@"completed"];
dispatch_async(dispatch_get_main_queue(), ^{
[mainQueueExpectation fulfill];
@@ -180,7 +180,7 @@ - (void)testSettingOverrideBaseElevationReturnsSetValue {
CGFloat expectedBaseElevation = 99;
// When
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
XCTestExpectation *mainQueueExpectation = [self expectationWithDescription:@"completed"];
dispatch_async(dispatch_get_main_queue(), ^{
[mainQueueExpectation fulfill];
@@ -201,7 +201,7 @@ - (void)testElevationDidChangeBlockCalledWhenElevationChangesValue {
MDCSnackbarManager.defaultManager.shouldApplyStyleChangesToVisibleSnackbars = YES;
// When
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
XCTestExpectation *mainQueueExpectation = [self expectationWithDescription:@"completed"];
dispatch_async(dispatch_get_main_queue(), ^{
[mainQueueExpectation fulfill];
@@ -230,7 +230,7 @@ - (void)testElevationDidChangeBlockNotCalledWhenElevationIsSetWithoutChangingVal
MDCSnackbarManager.defaultManager.shouldApplyStyleChangesToVisibleSnackbars = YES;
// When
- [MDCSnackbarManager showMessage:message];
+ [MDCSnackbarManager.defaultManager showMessage:message];
XCTestExpectation *mainQueueExpectation = [self expectationWithDescription:@"completed"];
dispatch_async(dispatch_get_main_queue(), ^{
[mainQueueExpectation fulfill];
diff --git a/components/Tabs/README.md b/components/Tabs/README.md
index 88fe39175e4..91ce007b074 100644
--- a/components/Tabs/README.md
+++ b/components/Tabs/README.md
@@ -8,273 +8,183 @@ path: /catalog/tabs/
api_doc_root: true
-->
-
-
# Tabs
[![Open bugs badge](https://img.shields.io/badge/dynamic/json.svg?label=open%20bugs&url=https%3A%2F%2Fapi.github.com%2Fsearch%2Fissues%3Fq%3Dis%253Aopen%2Blabel%253Atype%253ABug%2Blabel%253A%255BTabs%255D&query=%24.total_count)](https://github.com/material-components/material-components-ios/issues?q=is%3Aopen+is%3Aissue+label%3Atype%3ABug+label%3A%5BTabs%5D)
-Tabs are bars of buttons used to navigate between groups of content.
-
-
-
-
-
-## Design & API documentation
-
-
-
-## Table of contents
-
-- [Overview](#overview)
-- [Installation](#installation)
- - [Installation with CocoaPods](#installation-with-cocoapods)
- - [Importing](#importing)
-- [Usage](#usage)
- - [Importing](#importing)
- - [Delegate](#delegate)
- - [Selected item](#selected-item)
- - [Appearance](#appearance)
- - [Styling](#styling)
- - [Custom selection indicators](#custom-selection-indicators)
- - [Bottom navigation](#bottom-navigation)
-- [Examples](#examples)
- - [Creating a tab bar](#creating-a-tab-bar)
-- [Extensions](#extensions)
- - [Typography Theming](#typography-theming)
- - [Theming Extensions](#theming-extensions)
-- [MDCTabBarView](#mdctabbarview)
- - [Importing MDCTabBarView](#importing-mdctabbarview)
- - [Typical Use of MDCTabBarView](#typical-use-of-mdctabbarview)
- - [Migrating from MDCTabBar](#migrating-from-mdctabbar)
-
-- - -
-
-## Overview
-
-When a user taps a tab, the content changes to match the selected subject in the tabs.
-
-We provide this functionality through MDCTabBar which communicates via a delegate as well as
-MDCTabBarViewController which provides a view containment model similar to UITabViewController.
-
-Tabs can also show a badge (usually a number) like UITabBar.
-
-## Installation
-
-
-
-### Installation with CocoaPods
-
-Add the following to your `Podfile`:
+[Tabs](https://material.io/components/tabs) organize content across different screens, data sets, and other interactions.
-```bash
-pod 'MaterialComponents/Tabs'
-```
-
+Material tabs can be broken into two main categories: fixed and scrollable.
-Then, run the following command:
+### Fixed tabs
-```bash
-pod install
-```
+![fixed tab example](docs/assets/tabs-fixed-hero.png)
+
+### Scrollable tabs
-### Importing
+![scrollabe tab example](docs/assets/tabs-scrollable-hero.png)
-To import the component:
+## Contents
+
+* [Using tabs](#using-tabs)
+* [Installing tabs](#installing-tabs)
+* [Making tabs accessible](#making-tabs-accessible)
+* [Tabs anatomy](#tabs-anatomy)
+* [Theming tabs](#theming-tabs)
+* [Migrating from legacy tabs](#migrating-from-legacy-tabs)
+
+## Using tabs
+
+`MDCTabBarView` supports both fixed and scrolling tabs. By default, `MDCTabbarView` has a fixed layout. To set it up for scrolling, set the `preferredLayoutStyle` property to `.scrolling`. To receive updates about user actions, set the `delegate` property to an object conforming to `MDCTabBarViewDelegate`. Here is a simple set up of an `MDCTabBarView`:
#### Swift
+
```swift
-import MaterialComponents.MaterialTabs
+let tabBarView = MDCTabBarView()
+tabBarView.items = [
+ UITabBarItem(title: "Recents", image: UIImage(named: "phone"), tag: 0),
+ UITabBarItem(title: "Favorites", image: UIImage(named: "heart"), tag: 0),
+]
+view.addSubview(tabBarView)
+// Configure constraints
```
#### Objective-C
```objc
-#import "MaterialTabs.h"
+MDCTabBarView *tabBarView = [[MDCTabBarView alloc] init];
+tabBarView.items = @[
+ [[UITabBarItem alloc] initWithTitle:@"Recents" image:[UIImage imageNamed:@"phone"] tag:0],
+ [[UITabBarItem alloc] initWithTitle:@"Favorites" image:[UIImage imageNamed:@"heart"] tag:0],
+];
+[self.view addSubview:tabBarView];
+// Configure constraints
```
+## Installing tabs
+
+In order to use `MDCTabBarView`, first add the component to your `Podfile`:
-## Usage
+```bash
+pod MaterialComponents/Tabs+TabBarView
+```
+
-
+Then, run `pod install`.
-### Importing
+```bash
+pod install
+```
-To use the tab bar in your code, import the MaterialTabs umbrella header (Objective-C) or MaterialComponents module (Swift).
+After that, import the component target.
#### Swift
-
```swift
-import MaterialComponents
+import MaterialComponents.MaterialTabs_TabBarView
```
#### Objective-C
-
```objc
-#import "MaterialTabs.h"
+#import
```
-
-### Delegate
-
-Conform your class to the MDCTabBarDelegate protocol and set it as the tab bar's delegate to handle updating the UI when the user selects a tab.
-
-### Selected item
-
-Update the selected tab programmatically by setting `selectedItem`, optionally with an animation. Delegate methods are not called for programmatic changes, so callers are responsible for updating UI as needed after updating the selected item.
-
-### Appearance
-
-Set the `itemAppearance` property on the tab bar to switch between item display modes. Items can be displayed as titles (the default), icons, or combined.
+From there, initialize an `MDCTabBarView` and add it to your view controller's view.
-### Styling
+## Making tabs accessible
-By default, the tab bar is configured to display items with white text and icons. To customize the color of the tab bar, set the `tintColor`, `selectedItemTintColor`, `unselectedItemTintColor`, `inkColor`, and `barTintColor` properties. If `selectedItemTintColor` is nil, the tab bar's `tintColor` will be used automatically for selected items.
+`MDCTabBarView` is accessible by default. VoiceOver reads the titles of the `UITabBarItem`s contained within a tab bar as `accessibilityLabels`, and the `MDCTabBarView` handles setting the `accessibilityTraits` when tab bar items become selected and unselected.
-Configure where items are placed in the tab bar by setting the `alignment` property.
+## Tabs anatomy
-### Custom selection indicators
+Tab bars contain tab bar items with optional icons and text labels. Tab bar items can be selected or unselected. The selection indicator appears below the currently selected tab bar item.
-The currently-selected tab is indicated visually by a *selection indicator*. By default this is an
-underline, but you can customize its appearance by defining a selection indicator template and
-setting the `selectionIndicatorTemplate` property on the tab bar. Template objects are provided
-contextual information about a tab's content and return *attributes* that describe how that tab's
-indicator should appear. The indicator will then automatically display the provided shape and
-animate changes as the user selects different tabs.
+![Tabs anatomy diagram](docs/assets/tabs-anatomy.png)
-See `MDCTabBarIndicatorTemplate` and `MDCTabBarIndicatorAttributes` for details.
+1. Container
+2. Selected icon (optional if there’s a label)
+3. Selected text label (optional if there’s an icon)
+4. Selection indicator
+5. Unselected icon (optional if there’s a label)
+6. Unselected text label (optional if there’s an icon)
+7. Tab bar item
-### Bottom navigation
+### Container attributes
-Implement `positionForBar:` and return `UIBarPositionBottom` to configure the tab bar as a bottom
-navigation bar. The bar will automatically update with the appropriate styling.
-
-
-## Examples
-
-
-
-### Creating a tab bar
-
-
-#### Swift
+ | Attribute | Related method(s) | Default value
+------------- | -------------------- | ---------------------------------- | -------------
+**Color** | `barTintColor` | `-setBarTintColor:`
`-barTintColor` | white
+**Layout style** | `preferredLayoutStyle` | `-setPreferredLayoutStyle:`
`-preferredLayoutStyle` | `.fixed`
-```swift
-let tabBar = MDCTabBar(frame: view.bounds)
-tabBar.items = [
-UITabBarItem(title: "Recents", image: UIImage(named: "phone"), tag: 0),
-UITabBarItem(title: "Favorites", image: UIImage(named: "heart"), tag: 0),
-]
-tabBar.itemAppearance = .titledImages
-tabBar.autoresizingMask = [.flexibleWidth, .flexibleBottomMargin]
-tabBar.sizeToFit()
-view.addSubview(tabBar)
-```
+### Tab item icon attributes
-#### Objective-C
+ | Attribute | Related method(s) | Default value
+--------- | -------------- | ---------------------------------------------------------------- | -------------
+**Icon** | N/A | `-[UITabBarItem initWithTitle:image:tag:]`
`-[UITabBarItem initWithTitle:image:selectedImage:]` | `nil`
+**Color** | N/A | `-setImageTintColor:forState:`
`-imageTintColorForState:` | `nil`
-```objc
-MDCTabBar *tabBar = [[MDCTabBar alloc] initWithFrame:self.view.bounds];
-tabBar.items = @[
- [[UITabBarItem alloc] initWithTitle:@"Recents" image:[UIImage imageNamed:@"phone"] tag:0],
- [[UITabBarItem alloc] initWithTitle:@"Favorites" image:[UIImage imageNamed:@"heart"] tag:0],
-];
-tabBar.itemAppearance = MDCTabBarItemAppearanceTitledImages;
-tabBar.autoresizingMask =
- UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;
-[tabBar sizeToFit];
-[self.view addSubview:tabBar];
-```
+### Tab item text label attributes
-
+ | Attribute | Related method(s) | Default value
+---------------- | ------------------- | --------------------------------------------------------------- | -------------
+**Text** | N/A | `-[UITabBarItem initWithTitle:image:tag:]`
`-[UITabBarItem initWithTitle:image:selectedImage:]` | `nil`
+**Color** | N/A | `-setTitleColor:forState:`
`-titleColorForState:` | On primary color
+**Typography** | N/A | `-setTitleFont:forState:`
`-titleFontForState:` | Button
+### Tab item container attributes
-## Extensions
+ | Attribute | Related method(s) | Default value
+-------------------- | ------------------------------------------- | ------------------------------------------------ | -------------
+**Ripple color** | `rippleColor` | `-setRippleColor:`
`-rippleColor` | White at 16% opacity
-
+### Tab indicator attributes
+ | Attribute | Related method(s) | Default value
+---------------------- | ------------------------------- | ------------------------------------------------------------ | -------------
+**Color** | `selectionIndicatorStrokeColor` | `-setSelectionIndicatorStrokeColor:`
`-selectionIndicatorStrokeColor` | On primary color
+## Theming tabs
-
+Tabs supports Material Theming using a Container Scheme. To learn more about theming extensions, see [here](https://github.com/material-components/material-components-ios/blob/develop/docs/theming.md). Below is a screenshot of an `MDCTabBarView` with the Material Design Shrine theme:
-### Typography Theming
+![Shrine card](docs/assets/shrine-tabs.png)
-You can theme a tab bar with your app's typography scheme using the TypographyThemer extension.
+### Tabs theming example
-You must first add the Typography Themer extension to your project:
+To make use of tabs theming install the tabs theming extensions with Cocoapods. First, add the following line to your `Podfile`.
```bash
-pod 'MaterialComponents/Tabs+TypographyThemer'
-```
-
-#### Swift
-
-```swift
-// Step 1: Import the TypographyThemer extension
-import MaterialComponents.MaterialTabs_TypographyThemer
-
-// Step 2: Create or get a typography scheme
-let typographyScheme = MDCTypographyScheme()
-
-// Step 3: Apply the typography scheme to your component
-MDCTabBarTypographyThemer.applyTypographyScheme(typographyScheme, to: component)
+pod MaterialComponents/Tabs+TabBarViewTheming
```
-#### Objective-C
-
-```objc
-// Step 1: Import the TypographyThemer extension
-#import "MaterialTabs+TypographyThemer.h"
+
-// Step 2: Create or get a typography scheme
-id typographyScheme = [[MDCTypographyScheme alloc] init];
+Then Run the installer.
-// Step 3: Apply the typography scheme to your component
-[MDCTabBarTypographyThemer applyTypographyScheme:colorScheme
- toTabBar:component];
+```bash
+pod install
```
-
-
-
-
-### Theming Extensions
+Next, import the Tabs theming target, and call the correct theming method.
-`MDCTabBar` supports Material Theming using a Container Scheme.
-There are two variants for Material Theming of a MDCTabBar, which are the Primary Theme
-and the Surface Theme.
-
#### Swift
```swift
-// Import the Tabs Theming Extensions module
-import MaterialComponents.MaterialTabs_MaterialTheming
- ...
- // Create or use your app's Container Scheme
+import MaterialComponents.MaterialTabs_TabBarViewTheming
+...
+
+// Create an MDCTabbarView
+let tabBar = MDCTabBarView()
+// Create or use your app's Container Scheme
let containerScheme = MDCContainerScheme()
- // Theme the tab bar with either Primary Theme
+// Theme the tab bar with either Primary Theme
tabBar.applyPrimaryTheme(withScheme: containerScheme)
- // Or Surface Theme
+// Or Surface Theme
tabBar.applySurfaceTheme(withScheme: containerScheme)
```
@@ -282,78 +192,19 @@ tabBar.applySurfaceTheme(withScheme: containerScheme)
```objc
// Import the Tabs Theming Extensions header
-#import
- ...
- // Create or use your app's Container Scheme
+#import
+...
+// Create or use your app's Container Scheme
MDCContainerScheme *containerScheme = [[MDCContainerScheme alloc] init];
- // Theme the tab bar with either Primary Theme
+// Theme the tab bar with either Primary Theme
[self.tabBar applyPrimaryThemeWithScheme:containerScheme];
- // Or Surface Theme
+// Or Surface Theme
[self.tabBar applySurfaceThemeWithScheme:containerScheme];
```
-
+## Migrating from legacy tabs
-
-## MDCTabBarView
-
-
-
-> **_NOTE:_** This is currently in Beta. Features may change without warning and without a change in the Material
-> Components for iOS version number.
-
-
-
-
-
-
-
-
-
-### Importing MDCTabBarView
-
-`MDCTabBarView` is currently part of the MaterialComponentsBeta podspec. You
-may need to follow the [Material Components for iOS Beta integration
-guide](https://github.com/material-components/material-components-ios/blob/develop/contributing/beta_components.md)
-to configure your project to use `MDCTabBarView`.
-
-
-#### Swift
-
-```swift
-import MaterialComponentsBeta.MaterialTabs_TabBarView
-```
-
-#### Objective-C
-
-```objc
-#import "MaterialTabs+TabBarView.h"
-```
-
-
-### Typical Use of MDCTabBarView
-
-
-#### Swift
-
-```swift
-let tabBarView = MDCTabBarView()
-addSubview(tabBarView)
-
-// Configure constraints
-```
-
-#### Objective-C
-
-```objc
-MDCTabBarView *tabBarView = [[MDCTabBarView alloc] init];
-[self.view addSubview:tabBarView];
-
-// Configure constraints
-```
-
-
-### Migrating from MDCTabBar
+Below are some of the differences between `MDCTabBarView` and its predecessor, `MDCTabBar`. If you have been using `MDCTabBar`, make note of the following changes.
#### Subclassing Restricted
@@ -442,6 +293,3 @@ MDCTabBarView *tabBarView = [[MDCTabBarView alloc] init];
tabBarView.items = @[ customItem ]
```
-
-> **_NOTE:_** This will be updated as APIs are added and migrations are defined.
-
diff --git a/components/Tabs/docs/README.md b/components/Tabs/docs/README.md
deleted file mode 100644
index 0255632263e..00000000000
--- a/components/Tabs/docs/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# Tabs
-
-
-
-Tabs are bars of buttons used to navigate between groups of content.
-
-
-
-
-
-
-
-
-
-- - -
-
-## Overview
-
-When a user taps a tab, the content changes to match the selected subject in the tabs.
-
-We provide this functionality through MDCTabBar which communicates via a delegate as well as
-MDCTabBarViewController which provides a view containment model similar to UITabViewController.
-
-Tabs can also show a badge (usually a number) like UITabBar.
-
-## Installation
-
-- [Typical installation](../../../docs/component-installation.md)
-
-## Usage
-
-- [Usage](usage.md)
-
-## Examples
-
-- [Examples](examples.md)
-
-## Extensions
-
-- [Color Theming](color-theming.md)
-
-- [Typography Theming](typography-theming.md)
-
-- [Theming Extensions](theming-extensions.md)
-
-## MDCTabBarView
-
-- [MDCTabBarView](tabbarview.md)
diff --git a/components/Tabs/docs/assets/shrine-tabs.png b/components/Tabs/docs/assets/shrine-tabs.png
new file mode 100644
index 00000000000..46f57799830
Binary files /dev/null and b/components/Tabs/docs/assets/shrine-tabs.png differ
diff --git a/components/Tabs/docs/assets/tabbarview-defaults-Fixed-Justified.png b/components/Tabs/docs/assets/tabbarview-defaults-Fixed-Justified.png
deleted file mode 100644
index 05a447f6581..00000000000
Binary files a/components/Tabs/docs/assets/tabbarview-defaults-Fixed-Justified.png and /dev/null differ
diff --git a/components/Tabs/docs/assets/tabbarview-defaults-Scrollable-Leading.png b/components/Tabs/docs/assets/tabbarview-defaults-Scrollable-Leading.png
deleted file mode 100644
index 9eae5ec092a..00000000000
Binary files a/components/Tabs/docs/assets/tabbarview-defaults-Scrollable-Leading.png and /dev/null differ
diff --git a/components/Tabs/docs/assets/tabs-anatomy.png b/components/Tabs/docs/assets/tabs-anatomy.png
new file mode 100644
index 00000000000..3531eaf2025
Binary files /dev/null and b/components/Tabs/docs/assets/tabs-anatomy.png differ
diff --git a/components/Tabs/docs/assets/tabs-fixed-hero.png b/components/Tabs/docs/assets/tabs-fixed-hero.png
new file mode 100644
index 00000000000..079b9e01756
Binary files /dev/null and b/components/Tabs/docs/assets/tabs-fixed-hero.png differ
diff --git a/components/Tabs/docs/assets/tabs-scrollable-hero.png b/components/Tabs/docs/assets/tabs-scrollable-hero.png
new file mode 100644
index 00000000000..b7642bad4de
Binary files /dev/null and b/components/Tabs/docs/assets/tabs-scrollable-hero.png differ
diff --git a/components/Tabs/docs/assets/tabs.png b/components/Tabs/docs/assets/tabs.png
deleted file mode 100644
index 9d495430f9d..00000000000
Binary files a/components/Tabs/docs/assets/tabs.png and /dev/null differ
diff --git a/components/Tabs/docs/examples.md b/components/Tabs/docs/examples.md
deleted file mode 100644
index 0c030cb4cf8..00000000000
--- a/components/Tabs/docs/examples.md
+++ /dev/null
@@ -1,33 +0,0 @@
-### Creating a tab bar
-
-
-#### Swift
-
-```swift
-let tabBar = MDCTabBar(frame: view.bounds)
-tabBar.items = [
-UITabBarItem(title: "Recents", image: UIImage(named: "phone"), tag: 0),
-UITabBarItem(title: "Favorites", image: UIImage(named: "heart"), tag: 0),
-]
-tabBar.itemAppearance = .titledImages
-tabBar.autoresizingMask = [.flexibleWidth, .flexibleBottomMargin]
-tabBar.sizeToFit()
-view.addSubview(tabBar)
-```
-
-#### Objective-C
-
-```objc
-MDCTabBar *tabBar = [[MDCTabBar alloc] initWithFrame:self.view.bounds];
-tabBar.items = @[
- [[UITabBarItem alloc] initWithTitle:@"Recents" image:[UIImage imageNamed:@"phone"] tag:0],
- [[UITabBarItem alloc] initWithTitle:@"Favorites" image:[UIImage imageNamed:@"heart"] tag:0],
-];
-tabBar.itemAppearance = MDCTabBarItemAppearanceTitledImages;
-tabBar.autoresizingMask =
- UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;
-[tabBar sizeToFit];
-[self.view addSubview:tabBar];
-```
-
-
diff --git a/components/Tabs/docs/tabbarview.md b/components/Tabs/docs/tabbarview.md
deleted file mode 100644
index bdebbf2332f..00000000000
--- a/components/Tabs/docs/tabbarview.md
+++ /dev/null
@@ -1,145 +0,0 @@
-> **_NOTE:_** This is currently in Beta. Features may change without warning and without a change in the Material
-> Components for iOS version number.
-
-
-
-
-
-
-
-
-
-### Importing MDCTabBarView
-
-`MDCTabBarView` is currently part of the MaterialComponentsBeta podspec. You
-may need to follow the [Material Components for iOS Beta integration
-guide](https://github.com/material-components/material-components-ios/blob/develop/contributing/beta_components.md)
-to configure your project to use `MDCTabBarView`.
-
-
-#### Swift
-
-```swift
-import MaterialComponentsBeta.MaterialTabs_TabBarView
-```
-
-#### Objective-C
-
-```objc
-#import "MaterialTabs+TabBarView.h"
-```
-
-
-### Typical Use of MDCTabBarView
-
-
-#### Swift
-
-```swift
-let tabBarView = MDCTabBarView()
-addSubview(tabBarView)
-
-// Configure constraints
-```
-
-#### Objective-C
-
-```objc
-MDCTabBarView *tabBarView = [[MDCTabBarView alloc] init];
-[self.view addSubview:tabBarView];
-
-// Configure constraints
-```
-
-
-### Migrating from MDCTabBar
-
-#### Subclassing Restricted
-
-Subclassing is not supported by `MDCTabBarView`. Any requirements that you have
-for Material Tabs that are not met by the public APIs should be filed as a
-feature request or bug against `MDCTabBarView`.
-
-#### Selected Item Behavior
-
-`MDCTabBarView` does not automatically mark any item as *selected* when the
-`items` array is set, unless the previously-selected item is in the new
-`items` array. This is a change from `MDCTabBar`, but ensures that the view
-and its APIs present equivalent information.
-
-#### Colors, Fonts, and Theming
-
-To set the image tint colors, use `- setImageTintColor:forState:`. The
-`MDCTabBar` APIs, `- selectedItemTintColor` and `- unselectedItemTintColor` are
-unavailable.
-
-To set the fonts of the labels, use `- setTitleFont:forState:`.
-The `MDCTabBar` APIs, `- selectedItemTitleFont` and `- unselectedItemTitleFont`
-are unavailable. Note that the tab bar may adjust the sizes of its views to
-account for changes in fonts, and that can result in unexpected changes from
-Fixed Tabs to Scrollable Tabs depending on font choices and title length.
-
-`MDCTabBarView` uses Material Ripple by default (`MDCRippleView`) and does not
-support Ink. You may configure the Ripple color for touch feedback by setting
-the `- rippleColor` property.
-
-#### Alignment and Item Rendering
-
-The `MDCTabBar` API `itemAppearance` has no equivalent on `MDCTabBarView`.
-Whatever relevant properties (*e.g.*, `title`, `image`) are provided on `UITabBarItem`
-should be used instead.
-
-The `MDCTabBar` APIs `displaysUppercaseTitles` and `titleTextTransform` have no
-equivalent in `MDCTabBarView`. Titles are rendered as set on `UITabBarItem` and
-`accessibilityLabel` should be set on the item if the title text is not
-correctly handled by UIAccessibility.
-
-#### UIBarPositioningDelegate
-
-`MDCTabBarView` no longer conforms to `UIBarPositioning`, since Material Tabs
-are always positioned above their related content views. As a result,
-`MDCTabBarViewDelegate` does not inherit from `UIBarPositioningDelegate`.
-
-#### Selection Indicator Template
-
-The Selection Indicator Template APIs and protocols are copied nearly verbatim
-from `MDCTabBar`, with the names changed to prevent collision. One difference
-is the expected behavior of `contentFrame` as used by the indicator template.
-In `MDCTabBar` the value of `contentFrame` was the union of the title and image
-frames. However, in `MDCTabBarView` the width of the `contentFrame` is always
-the width of the title (when present), and the height will include both the
-title and image. This change is necessary to support internal clients.
-
-#### Custom Views
-
-Features like badges and horizontal layout of titles and images are not
-supported on `MDCTabBarView`. Clients who need such behavior should implement
-their own custom `UIView` and assign it to the `mdc_customView` property of a
-`UITabBarItem` sublcass that conforms to `MDCTabBarItemCustomViewing`. A simple
-subclass conforming to the `MDCTabBarItemCustomViewing` protocol is provided as
-`MDCTabBarItem`.
-
-
-
-##### Swift
-
-```swift
-let customView = MyCustomTabView()
-let customItem = MDCTabBarItem()
-customItem.mdc_customView = customView
-let tabBarView = MDCTabBarView()
-tabBarView.items = [ customItem ]
-```
-
-##### Objective-C
-
-```objc
-MyCustomTabView *customView = [[MyCustomTabView alloc] init];
-MDCTabBarItem *customItem = [[MDCTabBarItem alloc] init];
-customItem.mdc_customView = customView;
-MDCTabBarView *tabBarView = [[MDCTabBarView alloc] init];
-tabBarView.items = @[ customItem ]
-```
-
-
-> **_NOTE:_** This will be updated as APIs are added and migrations are defined.
diff --git a/components/Tabs/docs/theming-extensions.md b/components/Tabs/docs/theming-extensions.md
deleted file mode 100644
index bddc3711f34..00000000000
--- a/components/Tabs/docs/theming-extensions.md
+++ /dev/null
@@ -1,37 +0,0 @@
-### Theming Extensions
-
-`MDCTabBar` supports Material Theming using a Container Scheme.
-There are two variants for Material Theming of a MDCTabBar, which are the Primary Theme
-and the Surface Theme.
-
-
-
-#### Swift
-
-```swift
-// Import the Tabs Theming Extensions module
-import MaterialComponents.MaterialTabs_MaterialTheming
- ...
- // Create or use your app's Container Scheme
-let containerScheme = MDCContainerScheme()
- // Theme the tab bar with either Primary Theme
-tabBar.applyPrimaryTheme(withScheme: containerScheme)
- // Or Surface Theme
-tabBar.applySurfaceTheme(withScheme: containerScheme)
-```
-
-#### Objective-C
-
-```objc
-// Import the Tabs Theming Extensions header
-#import
- ...
- // Create or use your app's Container Scheme
-MDCContainerScheme *containerScheme = [[MDCContainerScheme alloc] init];
- // Theme the tab bar with either Primary Theme
-[self.tabBar applyPrimaryThemeWithScheme:containerScheme];
- // Or Surface Theme
-[self.tabBar applySurfaceThemeWithScheme:containerScheme];
-```
-
-
diff --git a/components/Tabs/docs/typography-theming.md b/components/Tabs/docs/typography-theming.md
deleted file mode 100644
index f824cda0758..00000000000
--- a/components/Tabs/docs/typography-theming.md
+++ /dev/null
@@ -1,37 +0,0 @@
-### Typography Theming
-
-You can theme a tab bar with your app's typography scheme using the TypographyThemer extension.
-
-You must first add the Typography Themer extension to your project:
-
-```bash
-pod 'MaterialComponents/Tabs+TypographyThemer'
-```
-
-#### Swift
-
-```swift
-// Step 1: Import the TypographyThemer extension
-import MaterialComponents.MaterialTabs_TypographyThemer
-
-// Step 2: Create or get a typography scheme
-let typographyScheme = MDCTypographyScheme()
-
-// Step 3: Apply the typography scheme to your component
-MDCTabBarTypographyThemer.applyTypographyScheme(typographyScheme, to: component)
-```
-
-#### Objective-C
-
-```objc
-// Step 1: Import the TypographyThemer extension
-#import "MaterialTabs+TypographyThemer.h"
-
-// Step 2: Create or get a typography scheme
-id typographyScheme = [[MDCTypographyScheme alloc] init];
-
-// Step 3: Apply the typography scheme to your component
-[MDCTabBarTypographyThemer applyTypographyScheme:colorScheme
- toTabBar:component];
-```
-
diff --git a/components/Tabs/docs/usage.md b/components/Tabs/docs/usage.md
deleted file mode 100644
index 3be139c3d07..00000000000
--- a/components/Tabs/docs/usage.md
+++ /dev/null
@@ -1,52 +0,0 @@
-### Importing
-
-To use the tab bar in your code, import the MaterialTabs umbrella header (Objective-C) or MaterialComponents module (Swift).
-
-
-#### Swift
-
-```swift
-import MaterialComponents
-```
-
-#### Objective-C
-
-```objc
-#import "MaterialTabs.h"
-```
-
-
-
-### Delegate
-
-Conform your class to the MDCTabBarDelegate protocol and set it as the tab bar's delegate to handle updating the UI when the user selects a tab.
-
-### Selected item
-
-Update the selected tab programmatically by setting `selectedItem`, optionally with an animation. Delegate methods are not called for programmatic changes, so callers are responsible for updating UI as needed after updating the selected item.
-
-### Appearance
-
-Set the `itemAppearance` property on the tab bar to switch between item display modes. Items can be displayed as titles (the default), icons, or combined.
-
-### Styling
-
-By default, the tab bar is configured to display items with white text and icons. To customize the color of the tab bar, set the `tintColor`, `selectedItemTintColor`, `unselectedItemTintColor`, `inkColor`, and `barTintColor` properties. If `selectedItemTintColor` is nil, the tab bar's `tintColor` will be used automatically for selected items.
-
-Configure where items are placed in the tab bar by setting the `alignment` property.
-
-### Custom selection indicators
-
-The currently-selected tab is indicated visually by a *selection indicator*. By default this is an
-underline, but you can customize its appearance by defining a selection indicator template and
-setting the `selectionIndicatorTemplate` property on the tab bar. Template objects are provided
-contextual information about a tab's content and return *attributes* that describe how that tab's
-indicator should appear. The indicator will then automatically display the provided shape and
-animate changes as the user selects different tabs.
-
-See `MDCTabBarIndicatorTemplate` and `MDCTabBarIndicatorAttributes` for details.
-
-### Bottom navigation
-
-Implement `positionForBar:` and return `UIBarPositionBottom` to configure the tab bar as a bottom
-navigation bar. The bar will automatically update with the appropriate styling.
diff --git a/components/Tabs/src/TabBarView/MDCTabBarView.h b/components/Tabs/src/TabBarView/MDCTabBarView.h
index bdf940639dd..2a1c10f107b 100644
--- a/components/Tabs/src/TabBarView/MDCTabBarView.h
+++ b/components/Tabs/src/TabBarView/MDCTabBarView.h
@@ -115,6 +115,8 @@ __attribute__((objc_subclassing_restricted)) @interface MDCTabBarView : UIScroll
/**
Whether or not the tab bar should adjust for safe area insets when calculating content size.
Default is YES.
+ @note If you set set this property to @c NO you should also set @c contentInsetAdjustmentBehavior
+ to @c UIScrollViewContentInsetAdjustmentNever.
*/
@property(nonatomic, assign) BOOL shouldAdjustForSafeAreaInsets;
diff --git a/components/Tabs/tests/snapshot/TabBarView/MDCTabBarViewSnapshotTests.m b/components/Tabs/tests/snapshot/TabBarView/MDCTabBarViewSnapshotTests.m
index 508c19472f5..d5ddcaa0ba9 100644
--- a/components/Tabs/tests/snapshot/TabBarView/MDCTabBarViewSnapshotTests.m
+++ b/components/Tabs/tests/snapshot/TabBarView/MDCTabBarViewSnapshotTests.m
@@ -1039,6 +1039,63 @@ - (void)testSafeAreaAndContentInsetCombineBottomAndRightForJustifiedLayoutStyle
[self generateSnapshotAndVerifyForView:superview];
}
+- (void)testSafeAreaShouldAdjustForSafeAreaInsets {
+ if (@available(iOS 11.0, *)) {
+ // Given
+ UITabBarItem *item1 = [[UITabBarItem alloc] initWithTitle:@"1" image:nil tag:0];
+ UITabBarItem *item2 = [[UITabBarItem alloc] initWithTitle:@"2" image:nil tag:2];
+ MDCTabBarViewSnapshotTestsSuperview *superview =
+ [[MDCTabBarViewSnapshotTestsSuperview alloc] init];
+ [superview addSubview:self.tabBarView];
+ self.tabBarView.items = @[ item1, item2 ];
+ [self.tabBarView setSelectedItem:item2 animated:NO];
+ self.tabBarView.shouldAdjustForSafeAreaInsets = YES;
+
+ // When
+ UIEdgeInsets safeAreaInsets = UIEdgeInsetsMake(30, 45, 0, 0);
+ superview.customSafeAreaInsets = safeAreaInsets;
+ CGSize fitSize = self.tabBarView.intrinsicContentSize;
+ fitSize = CGSizeMake(fitSize.width + safeAreaInsets.left, fitSize.height + safeAreaInsets.top);
+ self.tabBarView.bounds = CGRectMake(0, 0, fitSize.width, fitSize.height);
+ superview.bounds = CGRectMake(0, 0, CGRectGetWidth(self.tabBarView.bounds),
+ CGRectGetHeight(self.tabBarView.bounds));
+ self.tabBarView.center =
+ CGPointMake(CGRectGetMidX(superview.bounds), CGRectGetMidY(superview.bounds));
+
+ // Then
+ [self generateSnapshotAndVerifyForView:superview];
+ }
+}
+
+- (void)testSafeAreaShouldNotAdjustForSafeAreaInsets {
+ if (@available(iOS 11.0, *)) {
+ // Given
+ UITabBarItem *item1 = [[UITabBarItem alloc] initWithTitle:@"1" image:nil tag:0];
+ UITabBarItem *item2 = [[UITabBarItem alloc] initWithTitle:@"2" image:nil tag:2];
+ MDCTabBarViewSnapshotTestsSuperview *superview =
+ [[MDCTabBarViewSnapshotTestsSuperview alloc] init];
+ [superview addSubview:self.tabBarView];
+ self.tabBarView.items = @[ item1, item2 ];
+ [self.tabBarView setSelectedItem:item2 animated:NO];
+ self.tabBarView.shouldAdjustForSafeAreaInsets = NO;
+ [self.tabBarView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
+
+ // When
+ UIEdgeInsets safeAreaInsets = UIEdgeInsetsMake(30, 45, 0, 0);
+ superview.customSafeAreaInsets = safeAreaInsets;
+ CGSize fitSize = self.tabBarView.intrinsicContentSize;
+ fitSize = CGSizeMake(fitSize.width + safeAreaInsets.left, fitSize.height + safeAreaInsets.top);
+ self.tabBarView.bounds = CGRectMake(0, 0, fitSize.width, fitSize.height);
+ superview.bounds = CGRectMake(0, 0, CGRectGetWidth(self.tabBarView.bounds),
+ CGRectGetHeight(self.tabBarView.bounds));
+ self.tabBarView.center =
+ CGPointMake(CGRectGetMidX(superview.bounds), CGRectGetMidY(superview.bounds));
+
+ // Then
+ [self generateSnapshotAndVerifyForView:superview];
+ }
+}
+
#pragma mark - MDCTabBarView Properties
- (void)testSetTitleColorForExplicitItemStates {
diff --git a/components/TextControls/src/BaseTextAreas/MDCBaseTextArea.m b/components/TextControls/src/BaseTextAreas/MDCBaseTextArea.m
index e177fc5386f..b84d3010d35 100644
--- a/components/TextControls/src/BaseTextAreas/MDCBaseTextArea.m
+++ b/components/TextControls/src/BaseTextAreas/MDCBaseTextArea.m
@@ -24,6 +24,8 @@
#import "private/MDCBaseTextAreaLayout.h"
#import "private/MDCBaseTextAreaTextView.h"
+static char *const kKVOContextMDCBaseTextArea = "kKVOContextMDCBaseTextArea";
+
static const CGFloat kMDCBaseTextAreaDefaultMinimumNumberOfVisibleLines = (CGFloat)2.0;
static const CGFloat kMDCBaseTextAreaDefaultMaximumNumberOfVisibleLines = (CGFloat)4.0;
@@ -86,6 +88,11 @@ - (void)commonMDCBaseTextAreaInit {
[self setUpAssistiveLabels];
[self setUpTextView];
[self observeTextViewNotifications];
+ [self observeAssistiveLabelKeyPaths];
+}
+
+- (void)dealloc {
+ [self removeObservers];
}
#pragma mark Setup
@@ -577,4 +584,61 @@ - (void)observeTextViewNotifications {
object:nil];
}
+#pragma mark - Key-value observing
+
+- (void)observeAssistiveLabelKeyPaths {
+ for (NSString *keyPath in [MDCBaseTextArea assistiveLabelKVOKeyPaths]) {
+ [self.leadingAssistiveLabel addObserver:self
+ forKeyPath:keyPath
+ options:NSKeyValueObservingOptionNew
+ context:kKVOContextMDCBaseTextArea];
+ [self.trailingAssistiveLabel addObserver:self
+ forKeyPath:keyPath
+ options:NSKeyValueObservingOptionNew
+ context:kKVOContextMDCBaseTextArea];
+ }
+}
+
+- (void)removeObservers {
+ for (NSString *keyPath in [MDCBaseTextArea assistiveLabelKVOKeyPaths]) {
+ [self.leadingAssistiveLabel removeObserver:self
+ forKeyPath:keyPath
+ context:kKVOContextMDCBaseTextArea];
+ [self.trailingAssistiveLabel removeObserver:self
+ forKeyPath:keyPath
+ context:kKVOContextMDCBaseTextArea];
+ }
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath
+ ofObject:(id)object
+ change:(NSDictionary *)change
+ context:(void *)context {
+ if (context == kKVOContextMDCBaseTextArea) {
+ if (object != self.leadingAssistiveLabel && object != self.trailingAssistiveLabel) {
+ return;
+ }
+
+ for (NSString *assistiveLabelKeyPath in [MDCBaseTextArea assistiveLabelKVOKeyPaths]) {
+ if ([assistiveLabelKeyPath isEqualToString:keyPath]) {
+ [self invalidateIntrinsicContentSize];
+ [self setNeedsLayout];
+ break;
+ }
+ }
+ }
+}
+
++ (NSArray *)assistiveLabelKVOKeyPaths {
+ static NSArray *keyPaths = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ keyPaths = @[
+ NSStringFromSelector(@selector(text)),
+ NSStringFromSelector(@selector(font)),
+ ];
+ });
+ return keyPaths;
+}
+
@end
diff --git a/components/TextControls/src/BaseTextFields/MDCBaseTextField.m b/components/TextControls/src/BaseTextFields/MDCBaseTextField.m
index 81595e4b89b..d9d51cd3140 100644
--- a/components/TextControls/src/BaseTextFields/MDCBaseTextField.m
+++ b/components/TextControls/src/BaseTextFields/MDCBaseTextField.m
@@ -24,6 +24,8 @@
#import "MaterialTextControlsPrivate+Shared.h"
#import "MaterialTextControlsPrivate+TextFields.h"
+static char *const kKVOContextMDCBaseTextField = "kKVOContextMDCBaseTextField";
+
@interface MDCBaseTextField ()
@property(strong, nonatomic) UILabel *label;
@@ -73,6 +75,11 @@ - (void)commonMDCBaseTextFieldInit {
[self setUpLabel];
[self setUpAssistiveLabels];
[self observeContentSizeCategoryNotifications];
+ [self observeAssistiveLabelKeyPaths];
+}
+
+- (void)dealloc {
+ [self removeObservers];
}
#pragma mark View Setup
@@ -753,4 +760,61 @@ - (void)deleteBackward {
}
}
+#pragma mark - Key-value observing
+
+- (void)observeAssistiveLabelKeyPaths {
+ for (NSString *keyPath in [MDCBaseTextField assistiveLabelKVOKeyPaths]) {
+ [self.leadingAssistiveLabel addObserver:self
+ forKeyPath:keyPath
+ options:NSKeyValueObservingOptionNew
+ context:kKVOContextMDCBaseTextField];
+ [self.trailingAssistiveLabel addObserver:self
+ forKeyPath:keyPath
+ options:NSKeyValueObservingOptionNew
+ context:kKVOContextMDCBaseTextField];
+ }
+}
+
+- (void)removeObservers {
+ for (NSString *keyPath in [MDCBaseTextField assistiveLabelKVOKeyPaths]) {
+ [self.leadingAssistiveLabel removeObserver:self
+ forKeyPath:keyPath
+ context:kKVOContextMDCBaseTextField];
+ [self.trailingAssistiveLabel removeObserver:self
+ forKeyPath:keyPath
+ context:kKVOContextMDCBaseTextField];
+ }
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath
+ ofObject:(id)object
+ change:(NSDictionary *)change
+ context:(void *)context {
+ if (context == kKVOContextMDCBaseTextField) {
+ if (object != self.leadingAssistiveLabel && object != self.trailingAssistiveLabel) {
+ return;
+ }
+
+ for (NSString *assistiveLabelKeyPath in [MDCBaseTextField assistiveLabelKVOKeyPaths]) {
+ if ([assistiveLabelKeyPath isEqualToString:keyPath]) {
+ [self invalidateIntrinsicContentSize];
+ [self setNeedsLayout];
+ break;
+ }
+ }
+ }
+}
+
++ (NSArray *)assistiveLabelKVOKeyPaths {
+ static NSArray *keyPaths = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ keyPaths = @[
+ NSStringFromSelector(@selector(text)),
+ NSStringFromSelector(@selector(font)),
+ ];
+ });
+ return keyPaths;
+}
+
@end
diff --git a/components/Themes/README.md b/components/Themes/README.md
index e3f1399d245..8c906d65df4 100644
--- a/components/Themes/README.md
+++ b/components/Themes/README.md
@@ -16,8 +16,8 @@ Themes provides a mechanism to colorize components with color schemes. Color sch
### Requirements
-- Xcode 8.0 or higher.
-- iOS SDK version 9.0 or higher.
+- Xcode 10.0 or higher.
+- iOS SDK version 10.0 or higher.
### Installation with CocoaPods
diff --git a/components/Typography/tests/unit/UIFont+MaterialTypographyTests.m b/components/Typography/tests/unit/UIFont+MaterialTypographyTests.m
index 1aa88d0a063..9d27f02eeca 100644
--- a/components/Typography/tests/unit/UIFont+MaterialTypographyTests.m
+++ b/components/Typography/tests/unit/UIFont+MaterialTypographyTests.m
@@ -44,43 +44,20 @@ - (void)testMDC_standardFontForMaterialTextStyleReturnsEquivalentFonts {
}
- (void)testScaledFontForTraitEnvironmentOniOS10AndAboveConsultsTheTraitEnvironment {
- if (@available(iOS 10.0, *)) {
- // Given
- UIFont *font = [UIFont systemFontOfSize:22.0];
- font = [[[MDCFontScaler scalerForMaterialTextStyle:MDCTextStyleHeadline1]
- scaledFontWithFont:font] mdc_scaledFontAtDefaultSize];
- MDCTypographyMockTraitEnvironment *traitEnvironment =
- [[MDCTypographyMockTraitEnvironment alloc] init];
- traitEnvironment.traitCollection = [UITraitCollection
- traitCollectionWithPreferredContentSizeCategory:UIContentSizeCategoryExtraLarge];
-
- // When
- UIFont *scaledFont = [font mdc_scaledFontForTraitEnvironment:traitEnvironment];
-
- // Then
- XCTAssertGreaterThan(scaledFont.pointSize, font.pointSize);
- }
-}
-
-- (void)testScaledFontForTraitEnvironmentWithNoApplicationOniOS9DoesNothing {
- // Only run this test on iOS 9
- NSOperatingSystemVersion iOS10Version = {10, 0, 0};
- if ([NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:iOS10Version]) {
- return;
- }
-
// Given
- XCTAssertNil([UIApplication mdc_safeSharedApplication]);
UIFont *font = [UIFont systemFontOfSize:22.0];
- font = [[MDCFontScaler scalerForMaterialTextStyle:MDCTextStyleHeadline1] scaledFontWithFont:font];
+ font = [[[MDCFontScaler scalerForMaterialTextStyle:MDCTextStyleHeadline1] scaledFontWithFont:font]
+ mdc_scaledFontAtDefaultSize];
MDCTypographyMockTraitEnvironment *traitEnvironment =
[[MDCTypographyMockTraitEnvironment alloc] init];
+ traitEnvironment.traitCollection = [UITraitCollection
+ traitCollectionWithPreferredContentSizeCategory:UIContentSizeCategoryExtraLarge];
// When
UIFont *scaledFont = [font mdc_scaledFontForTraitEnvironment:traitEnvironment];
// Then
- XCTAssertTrue([scaledFont mdc_isSimplyEqual:font]);
+ XCTAssertGreaterThan(scaledFont.pointSize, font.pointSize);
}
@end
diff --git a/components/private/ThumbTrack/src/MDCThumbTrack.h b/components/private/ThumbTrack/src/MDCThumbTrack.h
index 09d8d945328..8f370e9e90a 100644
--- a/components/private/ThumbTrack/src/MDCThumbTrack.h
+++ b/components/private/ThumbTrack/src/MDCThumbTrack.h
@@ -313,20 +313,18 @@ typedef NS_ENUM(NSUInteger, MDCThumbDiscreteDotVisibility) {
/** Disable setting multitouch. Has to be NO. */
- (void)setMultipleTouchEnabled:(BOOL)multipleTouchEnabled NS_UNAVAILABLE;
-#pragma mark - To be deprecated
+@end
+
+@interface MDCThumbTrack (ToBeDeprecated)
/**
The color of the thumb and left track.
@note This API will be deprecated. Use @c thumbEnabledColor, @c trackOnColor, and
- @c inkColor instead.
+ @c rippleColor instead.
*/
@property(nullable, nonatomic, strong) UIColor *primaryColor;
-@end
-
-@interface MDCThumbTrack (ToBeDeprecated)
-
/**
The color of the Ink ripple.
@warning This method will eventually be deprecated. Opt-in to Ripple by setting
diff --git a/components/private/ThumbTrack/src/MDCThumbTrack.m b/components/private/ThumbTrack/src/MDCThumbTrack.m
index 064e131f7ac..75f841ff94d 100644
--- a/components/private/ThumbTrack/src/MDCThumbTrack.m
+++ b/components/private/ThumbTrack/src/MDCThumbTrack.m
@@ -84,6 +84,7 @@ @interface MDCThumbTrack ()
#endif // MDC_AVAILABLE_SDK_IOS(10_0)
@interface MDCThumbTrack ()
+@property(nonatomic, strong, nullable) UIColor *primaryColor;
@property(nonatomic, strong, nullable) MDCRippleView *rippleView;
@property(nonatomic, strong, nullable) MDCInkTouchController *touchController;
@end
@@ -110,6 +111,7 @@ @implementation MDCThumbTrack {
CGFloat _panThumbGrabPosition;
}
+@synthesize primaryColor = _primaryColor;
@synthesize thumbEnabledColor = _thumbEnabledColor;
@synthesize trackOnColor = _trackOnColor;
@synthesize touchController = _touchController;
@@ -138,11 +140,13 @@ - (instancetype)initWithFrame:(CGRect)frame onTintColor:(UIColor *)onTintColor {
_discrete = YES;
// Default thumb view.
- CGRect thumbFrame = CGRectMake(0, 0, self.thumbRadius * 2, self.thumbRadius * 2);
+ CGFloat sideLength = MAX(_thumbRadius * 2, kMinTouchSize);
+ CGRect thumbFrame = CGRectMake(0, 0, sideLength * 2, sideLength * 2);
_thumbView = [[MDCThumbView alloc] initWithFrame:thumbFrame];
_thumbView.borderWidth = kDefaultThumbBorderWidth;
_thumbView.cornerRadius = self.thumbRadius;
_thumbView.layer.zPosition = 1;
+ _thumbView.centerVisibleArea = YES;
[self addSubview:_thumbView];
_trackView = [[UIView alloc] init];
@@ -497,8 +501,9 @@ - (void)setThumbRadius:(CGFloat)thumbRadius {
- (void)setDisplayThumbRadius:(CGFloat)thumbRadius {
_thumbView.cornerRadius = thumbRadius;
CGPoint thumbCenter = _thumbView.center;
- _thumbView.frame = CGRectMake(thumbCenter.x - thumbRadius, thumbCenter.y - thumbRadius,
- 2 * thumbRadius, 2 * thumbRadius);
+ CGFloat halfSideLength = MAX(thumbRadius, kMinTouchSize / 2);
+ _thumbView.frame = CGRectMake(thumbCenter.x - halfSideLength, thumbCenter.y - halfSideLength,
+ 2 * halfSideLength, 2 * halfSideLength);
}
#pragma clang diagnostic push
@@ -543,7 +548,9 @@ - (void)setEnableRippleBehavior:(BOOL)enableRippleBehavior {
if (self.enableRippleBehavior) {
[self.touchController.defaultInkView removeFromSuperview];
- _rippleView.frame = self.thumbView.bounds;
+ _rippleView.frame = CGRectMake(CGRectGetMidX(self.thumbView.bounds) - self.thumbRadius,
+ CGRectGetMidY(self.thumbView.bounds) - self.thumbRadius,
+ 2 * self.thumbRadius, 2 * self.thumbRadius);
[self.thumbView addSubview:_rippleView];
} else {
[_rippleView removeFromSuperview];
diff --git a/components/private/ThumbTrack/src/MDCThumbView.m b/components/private/ThumbTrack/src/MDCThumbView.m
index 73b0baf1cbd..796a36b6fbf 100644
--- a/components/private/ThumbTrack/src/MDCThumbView.m
+++ b/components/private/ThumbTrack/src/MDCThumbView.m
@@ -51,6 +51,13 @@ - (instancetype)initWithFrame:(CGRect)frame {
return self;
}
+- (void)layoutSubviews {
+ [super layoutSubviews];
+
+ [self configureShapeGeneratorWithCornerRadius:self.cornerRadius
+ centerVisibleArea:self.centerVisibleArea];
+}
+
- (void)setBorderWidth:(CGFloat)borderWidth {
self.layer.shapedBorderWidth = borderWidth;
}
diff --git a/components/private/ThumbTrack/tests/unit/ThumbTrackRippleTests.m b/components/private/ThumbTrack/tests/unit/ThumbTrackRippleTests.m
index f6d5dd7eb26..75f520a911e 100644
--- a/components/private/ThumbTrack/tests/unit/ThumbTrackRippleTests.m
+++ b/components/private/ThumbTrack/tests/unit/ThumbTrackRippleTests.m
@@ -76,10 +76,12 @@ - (void)testRippleIsEnabledAndItsColorAndStyleAndBoundsAreCorrectWhenRippleBehav
// Then
XCTAssertNil(self.thumbTrack.touchController.defaultInkView.superview);
XCTAssertEqualObjects(self.thumbTrack.rippleView.superview, self.thumbTrack.thumbView);
- CGRect thumbViewBounds = CGRectStandardize(self.thumbTrack.thumbView.bounds);
+ CGFloat thumbViewRadius = self.thumbTrack.thumbRadius;
+ CGSize visibleThumbViewSize = CGSizeMake(2 * thumbViewRadius, 2 * thumbViewRadius);
CGRect rippleBounds = CGRectStandardize(self.thumbTrack.rippleView.bounds);
- XCTAssertTrue(CGRectEqualToRect(thumbViewBounds, rippleBounds), @"%@ is not equal to %@",
- NSStringFromCGRect(thumbViewBounds), NSStringFromCGRect(rippleBounds));
+ XCTAssertTrue(CGSizeEqualToSize(visibleThumbViewSize, rippleBounds.size),
+ @"%@ is not equal to %@", NSStringFromCGSize(visibleThumbViewSize),
+ NSStringFromCGSize(rippleBounds.size));
}
/**
diff --git a/contributing/writing_snapshot_tests.md b/contributing/writing_snapshot_tests.md
index ee780239056..3d8d9886a52 100644
--- a/contributing/writing_snapshot_tests.md
+++ b/contributing/writing_snapshot_tests.md
@@ -17,7 +17,7 @@ order to write snapshot tests for a component:
```
...
s.subspec "Cards" do |component|
- component.ios.deployment_target = '9.0'
+ component.ios.deployment_target = '10.0'
component.test_spec 'tests' do |tests|
tests.test_spec 'snapshot' do |snapshot_tests|
snapshot_tests.requires_app_host = true
diff --git a/demos/Bare/Podfile b/demos/Bare/Podfile
index b119fedee26..ee35b0620d9 100644
--- a/demos/Bare/Podfile
+++ b/demos/Bare/Podfile
@@ -1,5 +1,5 @@
target 'Bare' do
- platform :ios, '9.0'
+ platform :ios, '10.0'
project 'Bare.xcodeproj'
pod 'MaterialComponents', :path => '../../'
end
diff --git a/demos/Pesto/Podfile b/demos/Pesto/Podfile
index e92aabfb540..d1721809181 100644
--- a/demos/Pesto/Podfile
+++ b/demos/Pesto/Podfile
@@ -1,5 +1,5 @@
target 'Pesto' do
- platform :ios, '9.0'
+ platform :ios, '10.0'
project 'Pesto.xcodeproj'
pod 'MaterialComponents/AnimationTiming', :path => '../../'
pod 'MaterialComponents/AppBar', :path => '../../'
diff --git a/demos/Shrine/Podfile b/demos/Shrine/Podfile
index d87a097e785..9c0863bc126 100644
--- a/demos/Shrine/Podfile
+++ b/demos/Shrine/Podfile
@@ -1,4 +1,4 @@
-platform :ios, "9.0"
+platform :ios, "10.0"
use_frameworks!
target 'Shrine' do
diff --git a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec
index 8b90e77058c..31fd3c70f94 100644
--- a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec
+++ b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RemoteImageServiceForMDCDemos"
- s.version = "112.1.0"
+ s.version = "113.0.0"
s.summary = "A helper image class for the MDC demos."
s.description = "This spec is made for use in the MDC demos. It gets images via url."
s.homepage = "https://github.com/material-components/material-components-ios"
diff --git a/docs/build-env/README.md b/docs/build-env/README.md
index 024c5b5a4fa..3e29000588d 100644
--- a/docs/build-env/README.md
+++ b/docs/build-env/README.md
@@ -37,12 +37,11 @@ errors to allow the normal deprecation process to work:
### Xcode
-The core team tests against **Xcode 10.0 and Swift 3.2**.
-Swift 4 support is added whenever possible and will be the standard when Xcode 8 support is dropped.
+The core team tests against **Xcode 10.0 and Swift 5**.
### iOS
-Our components currently support **iOS 9.0 and up**.
+Our components currently support **iOS 10.0 and up**.
### CocoaPods
diff --git a/scripts/generated/icons.rb b/scripts/generated/icons.rb
index aa32b4185eb..efd47e44475 100644
--- a/scripts/generated/icons.rb
+++ b/scripts/generated/icons.rb
@@ -69,6 +69,17 @@ def registerIcons(s)
ss.dependency "#{Pathname.new(ss.name).dirname}/Base"
end
+ iss.subspec "ic_feedback" do |ss|
+ ss.public_header_files = "components/private/Icons/icons/ic_feedback/src/*.h"
+ ss.source_files = "components/private/Icons/icons/ic_feedback/src/*.{h,m}"
+ ss.resource_bundles = {
+ "MaterialIcons_ic_feedback" => [
+ "components/private/Icons/icons/ic_feedback/src/MaterialIcons_ic_feedback.xcassets",
+ ]
+ }
+ ss.dependency "#{Pathname.new(ss.name).dirname}/Base"
+ end
+
iss.subspec "ic_help_outline" do |ss|
ss.public_header_files = "components/private/Icons/icons/ic_help_outline/src/*.h"
ss.source_files = "components/private/Icons/icons/ic_help_outline/src/*.{h,m}"