Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Commit 4817cf3

Browse files
committed
Merge branch 'release-candidate' into stable
2 parents 8dbffc6 + 090d2fc commit 4817cf3

File tree

108 files changed

+643
-713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+643
-713
lines changed

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,87 @@
1+
# 115.1.0
2+
3+
In this minor release we add 2 APIs to customize BottomNavigation's appearance and behavior, we deprecate the property `rippleAllowsSelection` from `MDCChipView`, we provide a `containerRadius` API to `MDCBaseTextField` and `MDCBaseTextArea`, along with other code cleanups.
4+
5+
## New deprecations
6+
7+
`MDCChipView`'s `rippleAllowSelection` property is now deprecated. Please instead use native UIKit APIs to control whether the chip is selected or not, using either the .selected API, or, with MDCChipCollectionViewCell, by calling the `deselectItemAtIndexPath` API to remove selection. Note, this only applies if you have the `enableRippleBehavior` property set to `YES` on `MDCChipView`.
8+
9+
## New features
10+
11+
### BottomNavigation
12+
13+
You can now customize MDCBottomNavigationBar's height using the `barHeight` property.
14+
15+
```objc
16+
MDCBottomNavigationBar *bottomNavBar;
17+
bottomNavBar = [[MDCBottomNavigationBar alloc] initWithFrame:CGRectZero];
18+
bottomNavBar.barHeight = 44;
19+
[self.view addSubview:bottomNavBar];
20+
```
21+
22+
You can now also decide when to hide or show your navigation bar using the new `navigationBarHidden` APIs on MDCBottomNavigationBarController.
23+
24+
```swift
25+
let bottomNavBarController = MDCBottomNavigationBarController()
26+
bottomNavBarController.willMove(toParent: self)
27+
view.addSubview(bottomNavBarController.view)
28+
addChild(bottomNavBarController)
29+
bottomNavBarController.didMove(toParent: self)
30+
let viewController = UIViewController()
31+
bottomNavBarController.viewControllers = [viewController]
32+
bottomNavBarController.setNavigationBarHidden(true, animated: true)
33+
```
34+
35+
### TextControls
36+
37+
Both `MDCBaseTextArea` and `MDCBaseTextField` now have a `containerRadius` API, which determines the corner radius of the container, when applicable.
38+
Setting this property is a no-op for MDCBaseTextField and any subclasses with invisible containers.
39+
40+
```swift
41+
let filledTextField = MDCFilledTextField()
42+
filledTextField.label.text = "label text"
43+
filledTextField.containerRadius = 8
44+
```
45+
46+
## Component changes
47+
48+
### Banner
49+
50+
* [Change the trailing padding constraint for textView on MDCBannerView to match the Material Banner specs (https://material.io/components/banners#specs).](https://github.com/material-components/material-components-ios/commit/56226bbef5e50d2604b43699fad75c9d2d0b0873) (Nobody)
51+
52+
### BottomNavigation
53+
54+
* [Add navigationBarHidden property to MDCBottomNavigationBarController.](https://github.com/material-components/material-components-ios/commit/bb71d6bcbbf9205661e8a324db0d9ae260874689) (Bryan Oltman)
55+
* [Provide an API to set the bar's height.](https://github.com/material-components/material-components-ios/commit/5d3662f0a203cf38e3e379b094b0ffb5f6563b59) (Yarden Eitan)
56+
* [Remove all checks for iOS 10 availability now that components support iOS 10+](https://github.com/material-components/material-components-ios/commit/ef9fd055935cb3f29644ec1eeec10433355a3b31) (Alyssa Weiss)
57+
* [Remove no longer used string bundle references](https://github.com/material-components/material-components-ios/commit/6878fc63446902f4d78c73f4a486ad28ef6caf72) (Alyssa Weiss)
58+
* [Remove supplemental directory from examples.](https://github.com/material-components/material-components-ios/commit/d79d9a86c59ea80f5bbab56d3eaa9badc308d432) (Bryan Oltman)
59+
* [Update Bottom Navigation Item View accessibility traits so that VoiceOver works correctly on iOS 14.](https://github.com/material-components/material-components-ios/commit/898e373ea257b1122a758cd3855420204c5c018e) (Alyssa Weiss)
60+
61+
### Chips
62+
63+
* [Deprecate rippleAllowsSelection as we move away from MDCStatefulRippleView and to a simpler MDCRippleView when enableRippleBehavior is set to YES.](https://github.com/material-components/material-components-ios/commit/4bcf88708b46a38db2f9d695a8e44e0b744ba7ba) (Yarden Eitan)
64+
65+
### Snackbar
66+
67+
* [Enable shouldDismissOnOverlayTap for VO enabled scenario](https://github.com/material-components/material-components-ios/commit/dcda0408f462d9e15e31ed6d95d9654145dab3f4) (Yun Zhang)
68+
* [Example: Dismiss snackbars when push or popping the example VC.](https://github.com/material-components/material-components-ios/commit/4c6b2357e9cd89228049ae9cb4ea5b504fddafac) (Randall Li)
69+
* [Remove non-shared classes from Snackbar supplemental directory.](https://github.com/material-components/material-components-ios/commit/63670a7b2c49c376b13be1dc5bb29356469bc516) (Bryan Oltman)
70+
* [Remove references to deprecated static MDCSnackbarManager methods.](https://github.com/material-components/material-components-ios/commit/78868b55e6a01ed868f7a0918282d678605ce392) (Bryan Oltman)
71+
72+
### Tabs
73+
74+
* [Remove pre-iOS 10 handling for voiceover now that components support iOS 10+](https://github.com/material-components/material-components-ios/commit/6e127557ebe8d85faab9c4e1420343fad983fca6) (Alyssa Weiss)
75+
* [Remove unused StringsConstant file from Tabs](https://github.com/material-components/material-components-ios/commit/ef4dc34cad6855f43dc39b8e432761d9259516c7) (Alyssa Weiss)
76+
77+
### TextControls
78+
79+
* [Refactor sizing behavior + expose sizing delegate method](https://github.com/material-components/material-components-ios/commit/58ae5f81390b44bd675a0694caaf4e385a6e39a1) (Andrew Overton)
80+
* [Add `containerRadius` to MDCBaseTextField](https://github.com/material-components/material-components-ios/commit/d303da4db4c820f39ea5c69a29785aa43bb084a8) (Andrew Overton)
81+
* [Add containerRadius to filled style object and base text area](https://github.com/material-components/material-components-ios/commit/3aace45a832e030d2e7812e310ffb4488e0bf77b) (Andrew Overton)
82+
83+
---
84+
185
# 115.0.0
286

387
In this major release, we deprecated the Ink component in favor of Ripple and deleted the

MaterialComponents.podspec

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb'
22

33
Pod::Spec.new do |mdc|
44
mdc.name = "MaterialComponents"
5-
mdc.version = "115.0.0"
5+
mdc.version = "115.1.0"
66
mdc.authors = "The Material Components authors."
77
mdc.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
88
mdc.homepage = "https://github.com/material-components/material-components-ios"
@@ -1437,9 +1437,6 @@ Pod::Spec.new do |mdc|
14371437
"components/#{component.base_name}/src/ExtendedAlignment/*.{h,m}",
14381438
"components/#{component.base_name}/src/SizeClassDelegate/*.{h,m}"
14391439
]
1440-
component.resources = [
1441-
"components/#{component.base_name}/src/Material#{component.base_name}.bundle"
1442-
]
14431440

14441441
component.dependency "MDFInternationalization"
14451442
component.dependency "MaterialComponents/AnimationTiming"

MaterialComponentsEarlGreyTests.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "MaterialComponentsEarlGreyTests"
3-
s.version = "115.0.0"
3+
s.version = "115.1.0"
44
s.authors = "The Material Components authors."
55
s.summary = "This spec is an aggregate of all the Material Components EarlGrey tests."
66
s.description = "This spec is made for use in the MDC Catalog."

MaterialComponentsExamples.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "MaterialComponentsExamples"
3-
s.version = "115.0.0"
3+
s.version = "115.1.0"
44
s.authors = "The Material Components authors."
55
s.summary = "This spec is an aggregate of all the Material Components examples."
66
s.description = "This spec is made for use in the MDC Catalog. Used in conjunction with CatalogByConvention we create our Material Catalog."

MaterialComponentsSnapshotTests.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ end
5353

5454
Pod::Spec.new do |s|
5555
s.name = "MaterialComponentsSnapshotTests"
56-
s.version = "115.0.0"
56+
s.version = "115.1.0"
5757
s.authors = "The Material Components authors."
5858
s.summary = "This spec is an aggregate of all the Material Components snapshot tests."
5959
s.homepage = "https://github.com/material-components/material-components-ios"

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
115.0.0
1+
115.1.0

catalog/MDCCatalog/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>115.0.0</string>
18+
<string>115.1.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>115.0.0</string>
22+
<string>115.1.0</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UIAppFonts</key>

catalog/MDCDragons/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>115.0.0</string>
18+
<string>115.1.0</string>
1919
<key>CFBundleVersion</key>
20-
<string>115.0.0</string>
20+
<string>115.1.0</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
2323
<key>UILaunchStoryboardName</key>

catalog/MDCDragons/MDCDragonsController.swift

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,18 @@ class MDCDragonsController: UIViewController,
3535
UIGestureRecognizerDelegate
3636
{
3737

38+
let containerScheme: MDCContainerScheming = {
39+
let scheme = MDCContainerScheme()
40+
scheme.colorScheme = MDCSemanticColorScheme(defaults: .material201907)
41+
scheme.typographyScheme = MDCTypographyScheme(defaults: .material201902)
42+
scheme.shapeScheme = MDCShapeScheme()
43+
return scheme
44+
}()
45+
3846
fileprivate struct Constants {
3947
static let headerScrollThreshold: CGFloat = 50
4048
static let headerViewMaxHeight: CGFloat = 113
4149
static let headerViewMinHeight: CGFloat = 53
42-
static let bgColor = UIColor(white: 0.97, alpha: 1)
43-
static let headerColor = UIColor(red: 0.384, green: 0, blue: 0.933, alpha: 1.0)
44-
static let titleColor = UIColor(white: 0, alpha: 0.87)
45-
static let subtitleColor = UIColor(white: 0, alpha: 0.60)
4650
}
4751
fileprivate var cellsBySection: [[DragonCell]]
4852
fileprivate var nodes: [CBCNode]
@@ -110,7 +114,7 @@ class MDCDragonsController: UIViewController,
110114
headerViewController.headerView.maximumHeight = Constants.headerViewMaxHeight
111115
headerViewController.headerView.minimumHeight = Constants.headerViewMinHeight
112116

113-
view.backgroundColor = Constants.bgColor
117+
view.backgroundColor = containerScheme.colorScheme.backgroundColor
114118

115119
if #available(iOS 14.0, *) {
116120
#if compiler(>=5.3)
@@ -122,7 +126,7 @@ class MDCDragonsController: UIViewController,
122126
tableView.register(
123127
MDCDragonsTableViewCell.self,
124128
forCellReuseIdentifier: "MDCDragonsTableViewCell")
125-
tableView.backgroundColor = Constants.bgColor
129+
tableView.backgroundColor = containerScheme.colorScheme.backgroundColor
126130
tableView.delegate = self
127131
tableView.dataSource = self
128132
tableView.rowHeight = UITableView.automaticDimension
@@ -163,7 +167,7 @@ class MDCDragonsController: UIViewController,
163167

164168
headerViewController.headerView.addSubview(headerView)
165169
headerViewController.headerView.forwardTouchEvents(for: headerView)
166-
headerViewController.headerView.backgroundColor = Constants.headerColor
170+
headerViewController.headerView.backgroundColor = containerScheme.colorScheme.primaryColor
167171
if #available(iOS 14.0, *) {
168172
headerViewController.headerView.trackingScrollView = collectionView
169173
} else {
@@ -218,29 +222,30 @@ class MDCDragonsController: UIViewController,
218222
else {
219223
return UITableViewCell()
220224
}
221-
cell.backgroundColor = .white
222225
let nodeData =
223226
isSearchActive ? searched[indexPath.item] : cellsBySection[indexPath.section][indexPath.row]
224227
let componentName = nodeData.node.title
225228
cell.textLabel?.text = componentName
229+
cell.textLabel?.textColor = containerScheme.colorScheme.onBackgroundColor
230+
cell.tintColor = containerScheme.colorScheme.onBackgroundColor
226231
let node = nodeData.node
227232
if !node.isExample() && !isSearchActive {
228233
if nodeData.expanded {
229234
cell.accessoryView = cell.expandedAccessoryView
230-
cell.textLabel?.textColor = Constants.headerColor
235+
cell.textLabel?.textColor = containerScheme.colorScheme.primaryColor
231236
} else {
232237
cell.accessoryView = cell.collapsedAccessoryView
233-
cell.textLabel?.textColor = Constants.titleColor
238+
cell.textLabel?.textColor = containerScheme.colorScheme.onBackgroundColor
234239
}
235240
} else {
236241
cell.accessoryView = nil
237242
if indexPath.section != 0 {
238-
cell.textLabel?.textColor = Constants.subtitleColor
243+
cell.textLabel?.textColor = containerScheme.colorScheme.onBackgroundColor
239244
if let text = cell.textLabel?.text {
240245
cell.textLabel?.text = " " + text
241246
}
242247
} else if isSearchActive {
243-
cell.textLabel?.textColor = Constants.titleColor
248+
cell.textLabel?.textColor = containerScheme.colorScheme.onBackgroundColor
244249
}
245250
}
246251
return cell
@@ -260,11 +265,12 @@ class MDCDragonsController: UIViewController,
260265
if nodeData.expanded {
261266
collapseCells(at: indexPath)
262267
cell.accessoryView = cell.collapsedAccessoryView
263-
cell.textLabel?.textColor = Constants.titleColor
268+
cell.textLabel?.textColor = containerScheme.colorScheme.onBackgroundColor
269+
264270
} else {
265271
expandCells(at: indexPath)
266272
cell.accessoryView = cell.expandedAccessoryView
267-
cell.textLabel?.textColor = Constants.headerColor
273+
cell.textLabel?.textColor = containerScheme.colorScheme.primaryColor
268274
}
269275
self.tableView.endUpdates()
270276
nodeData.expanded = !nodeData.expanded
@@ -276,12 +282,6 @@ class MDCDragonsController: UIViewController,
276282

277283
let containerSchemeSel = NSSelectorFromString("setContainerScheme:")
278284
if vc.responds(to: containerSchemeSel) {
279-
let containerScheme = MDCContainerScheme()
280-
281-
containerScheme.colorScheme = MDCSemanticColorScheme(defaults: .material201907)
282-
containerScheme.typographyScheme = MDCTypographyScheme(defaults: .material201902)
283-
containerScheme.shapeScheme = MDCShapeScheme()
284-
285285
vc.perform(containerSchemeSel, with: containerScheme)
286286
}
287287

@@ -494,7 +494,7 @@ extension MDCDragonsController {
494494
frame: view.bounds, collectionViewLayout: generateLayout())
495495
view.addSubview(collectionView)
496496
collectionView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
497-
collectionView.backgroundColor = .white
497+
collectionView.backgroundColor = containerScheme.colorScheme.backgroundColor
498498
self.collectionView = collectionView
499499
collectionView.delegate = self
500500
}
@@ -509,7 +509,7 @@ extension MDCDragonsController {
509509
// Populate the cell with our item description.
510510
var contentConfiguration = cell.defaultContentConfiguration()
511511
contentConfiguration.text = menuItem.title
512-
contentConfiguration.textProperties.color = Constants.titleColor
512+
contentConfiguration.textProperties.color = containerScheme.colorScheme.onBackgroundColor
513513
cell.contentConfiguration = contentConfiguration
514514

515515
let disclosureOptions = UICellAccessory.OutlineDisclosureOptions(style: .header)
@@ -525,7 +525,7 @@ extension MDCDragonsController {
525525
// Populate the cell with our item description.
526526
var contentConfiguration = cell.defaultContentConfiguration()
527527
contentConfiguration.text = menuItem.title
528-
contentConfiguration.textProperties.color = Constants.subtitleColor
528+
contentConfiguration.textProperties.color = containerScheme.colorScheme.onBackgroundColor
529529
cell.contentConfiguration = contentConfiguration
530530
cell.backgroundConfiguration = UIBackgroundConfiguration.clear()
531531
}

catalog/MDCDragons/MDCDragonsTableViewCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ import MaterialComponents.MaterialIcons_ic_arrow_back
1919
class MDCDragonsTableViewCell: UITableViewCell {
2020

2121
lazy var collapsedAccessoryView: UIView = {
22-
let image = MDCIcons.imageFor_ic_chevron_right()
22+
let image = MDCIcons.imageFor_ic_chevron_right()?.withRenderingMode(.alwaysTemplate)
2323
let view = UIImageView(image: image)
2424
view.frame = CGRect(x: 0, y: 0, width: 20, height: 20)
2525
return view
2626
}()
2727

2828
lazy var expandedAccessoryView: UIView = {
29-
let image = MDCIcons.imageFor_ic_chevron_right()
29+
let image = MDCIcons.imageFor_ic_chevron_right()?.withRenderingMode(.alwaysTemplate)
3030
let view = UIImageView(image: image)
3131
view.frame = CGRect(x: 0, y: 0, width: 20, height: 20)
3232
view.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2)

0 commit comments

Comments
 (0)