-
Notifications
You must be signed in to change notification settings - Fork 947
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-candidate' into stable
- Loading branch information
Showing
53 changed files
with
843 additions
and
444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,37 @@ | ||
# 109.4.0 | ||
|
||
This minor release adds Theming extension support to MDCBottomDrawerViewController and includes bug fixes and minor refactoring. | ||
|
||
## New features | ||
|
||
- MDCBottomDrawerViewController now has Theming extension support. | ||
|
||
## Component changes | ||
|
||
### AppBar | ||
|
||
* [Add NavigationController example with AppBar initially hidden.](https://github.com/material-components/material-components-ios/commit/dbb9ab1170fda2c4fd571fe682d1af6a84278a8e) (Jeff Verkoeyen) | ||
|
||
### FlexibleHeader | ||
|
||
* [Change links in FlexibleHeader README](https://github.com/material-components/material-components-ios/commit/a31b69ecd1bb89c33bcae5843a309808872889e4) (Andrew Overton) | ||
* [Extract a shifter logical unit.](https://github.com/material-components/material-components-ios/commit/bebb73f5e55ec5b2fe9e6ba8bec57ca2e6b4b4aa) (Jeff Verkoeyen) | ||
|
||
### Tabs | ||
|
||
* [Add support for custom accessibility labels for tab bar items.](https://github.com/material-components/material-components-ios/commit/7335fb5ca9c46a4b27f731724f23c2c4cbdbeec3) (Yarden Eitan) | ||
|
||
## Multi-component changes | ||
|
||
* [ - 51170612999194997e160654411ac87bb61d4764 Automatic changelog preparation for release. by Galia Kaufman <[email protected]> - 85feb7896b37c0a93b8c5b5dbcde72403b379dee [Tabs] Update podspec to include new folders. by Galia Kaufman <[email protected]> - fbd3f81309b46b9d8e0a6a9dd03e4b63c7794f27 Hand-modified CHANGELOG.md API diff. by Galia Kaufman <[email protected]> - 27927ce42748c7afb3ac270b6d6ec64d1c50d3bc Bumped version number to 109.3.1. by Galia Kaufman <[email protected]>](https://github.com/material-components/material-components-ios/commit/2d0d6a8faa6fe7acea7921552a8afe1f656c9088) (Galia Kaufman) | ||
* [Ensure that the FlexibleHeader's position reacts to safeAreaInsets changes when hidden.](https://github.com/material-components/material-components-ios/commit/a502ce66b98101fcc155f98696a974ff91083557) (Jeff Verkoeyen) | ||
* [Fix broken links This CL fixes some longstanding and some newly broken links.](https://github.com/material-components/material-components-ios/commit/0a36a3a12be81c9d2d1d84f15452ed6153c97f74) (Andrew Overton) | ||
* [Fix broken links This CL fixes some longstanding and some newly broken links.](https://github.com/material-components/material-components-ios/commit/1fa6c77ee83f13b2e9711ae182cef5999152f36b) (Andrew Overton) | ||
* [Internal change](https://github.com/material-components/material-components-ios/commit/70716800b8db661d8efa744ab8a3f41e15b99f57) (Nobody) | ||
* [Internal change](https://github.com/material-components/material-components-ios/commit/efea2ddce69e4fdde643fe2e367b1f16b16c9880) (Jeff Verkoeyen) | ||
|
||
--- | ||
|
||
# 109.3.1 | ||
|
||
This hotfix patch release fixes the podspec. Updating the podpsec with new folders that were added in the previous release. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
109.3.1 | ||
109.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 159 additions & 0 deletions
159
components/AppBar/examples/AppBarNavigationControllerWithAppBarInitiallyHiddenExample.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
// Copyright 2020-present the Material Components for iOS authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import Foundation | ||
import MaterialComponents.MaterialAppBar | ||
import MaterialComponents.MaterialAppBar_Theming | ||
import MaterialComponents.MaterialContainerScheme | ||
|
||
class AppBarNavigationControllerWithAppBarInitiallyHiddenExample: | ||
UIViewController, | ||
MDCAppBarNavigationControllerDelegate { | ||
|
||
@objc var containerScheme: MDCContainerScheming = MDCContainerScheme() | ||
|
||
init() { | ||
super.init(nibName: nil, bundle: nil) | ||
|
||
self.title = "Navigation Controller" | ||
} | ||
|
||
required init?(coder aDecoder: NSCoder) { | ||
super.init(coder: aDecoder) | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
self.view.backgroundColor = self.containerScheme.colorScheme.backgroundColor | ||
|
||
self.navigationItem.rightBarButtonItem = | ||
UIBarButtonItem(title: "Present", | ||
style: .done, | ||
target: self, | ||
action: #selector(presentModalAnimated)) | ||
} | ||
|
||
@objc func presentModalAnimated() { | ||
presentModal(animated: true) | ||
} | ||
|
||
func presentModal(animated: Bool) { | ||
let contentViewController = PresentedViewController() | ||
let navigationController = MDCAppBarNavigationController() | ||
navigationController.shouldSetNavigationBarHiddenHideAppBar = true | ||
navigationController.delegate = self | ||
navigationController.pushViewController(contentViewController, animated: false) | ||
|
||
contentViewController.navigationItem.rightBarButtonItem = | ||
UIBarButtonItem(title: "Dismiss", | ||
style: .done, | ||
target: self, | ||
action: #selector(dismissModal)) | ||
|
||
// Explicitly use the full-screen style to validate safe area insets behavior. | ||
navigationController.modalPresentationStyle = .fullScreen | ||
|
||
self.present(navigationController, animated: animated, completion: nil) | ||
} | ||
|
||
@objc func dismissModal() { | ||
dismiss(animated: true) | ||
} | ||
|
||
// MARK: - MDCAppBarNavigationControllerDelegate | ||
|
||
func appBarNavigationController(_ navigationController: MDCAppBarNavigationController, | ||
willAdd appBarViewController: MDCAppBarViewController, | ||
asChildOf viewController: UIViewController) { | ||
appBarViewController.applyPrimaryTheme(withScheme: self.containerScheme) | ||
} | ||
} | ||
|
||
private class PresentedViewController: UITableViewController { | ||
|
||
init() { | ||
super.init(nibName: nil, bundle: nil) | ||
|
||
self.title = "Presented" | ||
|
||
self.navigationItem.leftBarButtonItem = | ||
UIBarButtonItem(title: "Toggle", | ||
style: .done, | ||
target: self, | ||
action: #selector(toggleVisibility)) | ||
} | ||
|
||
required init?(coder aDecoder: NSCoder) { | ||
super.init(coder: aDecoder) | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
navigationController?.setNavigationBarHidden(true, animated: false) | ||
} | ||
|
||
// MARK - Actions | ||
|
||
@objc func toggleVisibility() { | ||
guard let navigationController = navigationController else { | ||
return | ||
} | ||
navigationController.setNavigationBarHidden(!navigationController.isNavigationBarHidden, | ||
animated: true) | ||
} | ||
|
||
// MARK: - UITableViewDataSource | ||
|
||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
return 50 | ||
} | ||
|
||
override func tableView(_ tableView: UITableView, | ||
cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
|
||
return self.tableView.dequeueReusableCell(withIdentifier: "cell") ?? | ||
UITableViewCell(style: .default, reuseIdentifier: "cell") | ||
} | ||
|
||
// MARK - UITableViewDelegate | ||
|
||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
toggleVisibility() | ||
|
||
tableView.deselectRow(at: indexPath, animated: true) | ||
} | ||
} | ||
|
||
// MARK: Catalog by convention | ||
extension AppBarNavigationControllerWithAppBarInitiallyHiddenExample { | ||
|
||
@objc class func catalogMetadata() -> [String: Any] { | ||
return [ | ||
"breadcrumbs": ["App Bar", "Navigation Controller (app bar hidden)"], | ||
"primaryDemo": false, | ||
"presentable": false, | ||
] | ||
} | ||
} | ||
|
||
// MARK: Snapshot testing by convention | ||
extension AppBarNavigationControllerWithAppBarInitiallyHiddenExample { | ||
|
||
@objc func testPresented() { | ||
// TODO(b/152510959): The AppBar is expected to be hidden, but it is not. | ||
presentModal(animated: false) | ||
} | ||
} |
Oops, something went wrong.