Skip to content

Commit

Permalink
Merge branch 'release-candidate' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenyu Zhang committed Jan 5, 2021
2 parents e86683e + a343e1a commit 2ec04e6
Show file tree
Hide file tree
Showing 41 changed files with 681 additions and 425 deletions.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# 119.4.0

In this minor release, we added a new contentEdgeInsets API to Banner, added support for vertically centered image views in MDCSelfSizingStereoCell, and improved support for tvOS.

## API changes

### Banner

*new* property: `contentEdgeInsets` in `MDCBannerView`.

### Lists

*new* enum: `MDCSelfSizingStereoCellImageViewVerticalPosition`.
*new* property: `leadingImageViewVerticalPosition` in `MDCSelfSizingStereoCell`.
*new* property: `trailingImageViewVerticalPosition` in `MDCSelfSizingStereoCell`.

## Component changes

### Banner

* [ Add contentEdgeInsets support to replace layoutMargins usage in sizeThatFits:.](https://github.com/material-components/material-components-ios/commit/8bd8b295e227310a8c835ec9d3f58ca3b651319a) (Wenyu Zhang)
* [setNeedsLayout before showing Banner in BannerAutolayoutSwiftExampleViewController](https://github.com/material-components/material-components-ios/commit/1faf60e6f5fee51470fc2b21b26304879d6405da) (Wenyu Zhang)

### Cards

* [Update setting corner radius to match team style guide](https://github.com/material-components/material-components-ios/commit/4b7c446e7e14b43202421311894e388b18df6650) (Cody Weaver)

### List

* [Support vertically centered image views in MDCSelfSizingStereoCell](https://github.com/material-components/material-components-ios/commit/bdeb1f7e9d23708ab01440cb3f7e9d681c195038) (Andrew Overton)

## Multi-component changes

* [Additional requested docs changes](https://github.com/material-components/material-components-ios/commit/b42de42c876dada1437193a2c0b793b5cef41e70) (Andrew Overton)
* [Ensure swift snippets always come before objc](https://github.com/material-components/material-components-ios/commit/08ca10b07876de6f363c7f6baf6b265f3980fea1) (Andrew Overton)
* [Improve support for tvOS.](https://github.com/material-components/material-components-ios/commit/3bc7339b7a8e834a661de78fe3ae9805468f5259) (Jeff Verkoeyen)

---

# 119.3.0

In this minor release we added a new method to the `MDCBaseTextFieldDelegate` protocol and fixed bugs in NavigationDrawer, TextControls, and Tabs.
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponents.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb'

Pod::Spec.new do |mdc|
mdc.name = "MaterialComponents"
mdc.version = "119.3.0"
mdc.version = "119.4.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"
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsEarlGreyTests.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsEarlGreyTests"
s.version = "119.3.0"
s.version = "119.4.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."
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsExamples.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsExamples"
s.version = "119.3.0"
s.version = "119.4.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."
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsSnapshotTests.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ end

Pod::Spec.new do |s|
s.name = "MaterialComponentsSnapshotTests"
s.version = "119.3.0"
s.version = "119.4.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"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
119.3.0
119.4.0
4 changes: 2 additions & 2 deletions catalog/MDCCatalog/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>119.3.0</string>
<string>119.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>119.3.0</string>
<string>119.4.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
Expand Down
4 changes: 2 additions & 2 deletions catalog/MDCDragons/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>119.3.0</string>
<string>119.4.0</string>
<key>CFBundleVersion</key>
<string>119.3.0</string>
<string>119.4.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
2 changes: 1 addition & 1 deletion catalog/MaterialCatalog/MaterialCatalog.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialCatalog"
s.version = "119.3.0"
s.version = "119.4.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"
Expand Down
15 changes: 2 additions & 13 deletions components/AppBar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ information and actions relating to the current screen.

* [Using top app bars](#using-top-app-bars)
* [Regular top app bar](#regular-top-app-bar)
* [Contextual action bar](#contextual-action-bar)
* [Theming](#theming)
* [Migration guides](#migration-guides)
* [Unsupported](#unsupported)
Expand Down Expand Up @@ -104,16 +103,10 @@ NSLog(@"accessibilityLabel: %@",self.navigationItem.rightBarButtonItem.accessibi
```
<!--</div>-->
## Types
There are two types of top app bar:
1. [Regular top app bar](#regular-top-app-bar)
1. [Contextual action bar](#contextual-action-bar)
![Regular top app bar and contextual action bars](docs/assets/appbar-types.png)
## Regular top app bar
![Example of an iOS regular top app bar](docs/assets/app-bar-example.png)
Regular top app bars are the only top app bars supported on iOS.
### Top app bar examples
Expand Down Expand Up @@ -641,10 +634,6 @@ See the [FlexibleHeader](../FlexibleHeader) documentation for additional usage g
-------------------------------- | -------------------- | ------------------------------------------ | -------------
**Icons** | `-[UIViewController navigationItem]` | `-setLeftBarButtonItems:`<br>`-leftBarButtonItems`<br>`-setRightBarButtonItems:`<br>`-rightBarButtonItems` | `nil`

## Contextual action bar

Contextual action bars are not implemented on iOS.

## Theming

`MDCAppBarViewController` supports Material Theming using a Container Scheme. To theme your app bar, add the `AppBar+Theming` subspec to your `Podfile`:
Expand Down
Binary file added components/AppBar/docs/assets/app-bar-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed components/AppBar/docs/assets/appbar-types.png
Binary file not shown.
2 changes: 1 addition & 1 deletion components/Banner/examples/AppBarBannerExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ - (void)dismissBanner {
- (void)showBanner {
self.banner = [[MDCBannerView alloc] init];
[self.banner applyThemeWithScheme:_containerScheme];
self.banner.layoutMargins = UIEdgeInsetsMake(0, 8, 0, 8);
self.banner.contentEdgeInsets = UIEdgeInsetsMake(0, 8, 0, 8);
self.banner.textView.text = @"This banner has been set as bottomBar of this AppBar.";
[self.banner.leadingButton setTitle:@"Dismiss" forState:UIControlStateNormal];
[self.banner.leadingButton addTarget:self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
// limitations under the License.

import UIKit

import MaterialComponents.MaterialBanner
import MaterialComponents.MaterialBanner_Theming
import MaterialComponents.MaterialBanner_Theming
import MaterialComponents.MaterialButtons
import MaterialComponents.MaterialButtons_Theming
import MaterialComponents.MaterialButtons_Theming
import MaterialComponents.MaterialColorScheme
import MaterialComponents.MaterialContainerScheme

Expand All @@ -33,7 +32,8 @@ class BannerAutoLayoutSwiftExampleViewController: UIViewController {
showBannerButton.translatesAutoresizingMaskIntoConstraints = false
showBannerButton.applyTextTheme(withScheme: containerScheme)
showBannerButton.setTitle("Material Banner", for: .normal)
showBannerButton.addTarget(self, action: #selector(self.didTapShowBannerButton), for: .touchUpInside)
showBannerButton.addTarget(
self, action: #selector(self.didTapShowBannerButton), for: .touchUpInside)
view.addSubview(showBannerButton)
showBannerButton.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
showBannerButton.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
Expand All @@ -45,7 +45,8 @@ class BannerAutoLayoutSwiftExampleViewController: UIViewController {
bannerView.layoutMargins = .zero
let actionButton = bannerView.leadingButton
actionButton.setTitle("Dismiss", for: .normal)
actionButton.addTarget(self, action: #selector(self.didTapDismissOnBannerView), for: .touchUpInside)
actionButton.addTarget(
self, action: #selector(self.didTapDismissOnBannerView), for: .touchUpInside)
bannerView.applyTheme(withScheme: containerScheme)
view.addSubview(bannerView)
bannerView.isHidden = true
Expand All @@ -60,7 +61,8 @@ class BannerAutoLayoutSwiftExampleViewController: UIViewController {

@objc func didTapShowBannerButton() {
bannerView.isHidden = false
UIAccessibility.post(notification:.layoutChanged, argument: bannerView);
bannerView.setNeedsLayout()
UIAccessibility.post(notification: .layoutChanged, argument: bannerView)
}

@objc func didTapDismissOnBannerView() {
Expand Down
9 changes: 9 additions & 0 deletions components/Banner/src/MDCBannerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ __attribute__((objc_subclassing_restricted)) @interface MDCBannerView
*/
@property(nonatomic, readwrite, strong, nonnull) UIColor *dividerColor;

/**
The insets applied to the banner for all its content.
The banner uses this property to determine @c intrinsicContentSize and @c sizeThatFits:.
The default value is @c UIEdgeInsetsZero.
*/
@property(nonatomic, readwrite, assign) UIEdgeInsets contentEdgeInsets;

/*
Indicates whether the banner should automatically update its font when the device’s
UIContentSizeCategory is changed.
Expand Down
Loading

0 comments on commit 2ec04e6

Please sign in to comment.