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
afweiss committed Jan 11, 2021
2 parents 2ec04e6 + 814c354 commit 07cab9a
Show file tree
Hide file tree
Showing 18 changed files with 77 additions and 16 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,21 @@
# 119.5.0

In this minor release, we added a new userDraggingEnabled API to MDCBottomDrawerViewController.

## API changes

### NavigationDrawer

*new* property `userDraggingEnabled` in `MDCBottomDrawerViewController`.

## Component changes

### NavigationDrawer

* [Adds a property to `MDCBottomDrawerViewController` which allows to disable scrolling. It essentially exposes the 'scrollEnabled' property of the internal scroll view so that users may not drag the drawer manually. Programatic modifications of the content offset are still allowed.](https://github.com/material-components/material-components-ios/commit/e042db31045720e8995b924acf773205f3cf9603) (Nobody)

---

# 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.
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponents.podspec
Expand Up @@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb'

Pod::Spec.new do |mdc|
mdc.name = "MaterialComponents"
mdc.version = "119.4.0"
mdc.version = "119.5.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
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsEarlGreyTests"
s.version = "119.4.0"
s.version = "119.5.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
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsExamples"
s.version = "119.4.0"
s.version = "119.5.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
Expand Up @@ -53,7 +53,7 @@ end

Pod::Spec.new do |s|
s.name = "MaterialComponentsSnapshotTests"
s.version = "119.4.0"
s.version = "119.5.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
@@ -1 +1 @@
119.4.0
119.5.0
4 changes: 2 additions & 2 deletions catalog/MDCCatalog/Info.plist
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>119.4.0</string>
<string>119.5.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>119.4.0</string>
<string>119.5.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
Expand Down
4 changes: 2 additions & 2 deletions catalog/MDCDragons/Info.plist
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>119.4.0</string>
<string>119.5.0</string>
<key>CFBundleVersion</key>
<string>119.4.0</string>
<string>119.5.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
2 changes: 1 addition & 1 deletion catalog/MaterialCatalog/MaterialCatalog.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialCatalog"
s.version = "119.4.0"
s.version = "119.5.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
2 changes: 1 addition & 1 deletion components/LibraryInfo/src/MDCLibraryInfo.m
Expand Up @@ -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 = @"119.4.0";
static NSString* const kMDCLibraryInfoVersionString = @"119.5.0";

@implementation MDCLibraryInfo

Expand Down
2 changes: 1 addition & 1 deletion components/LibraryInfo/tests/unit/LibraryInfoTests.m
Expand Up @@ -26,7 +26,7 @@ - (void)testVersionFormat {
// Given

// This regex pattern does the following:
// Accept: "119.4.0", etc.
// Accept: "119.5.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
Expand Down
Expand Up @@ -181,6 +181,9 @@
*/
@property(nonatomic) BOOL shouldDisplayMobileLandscapeFullscreen;

/** Whether the drawer allows the user to drag it or not. */
@property(nonatomic) BOOL userDraggingEnabled;

/**
Sets the content offset Y of the drawer's content. If contentOffsetY is set to 0, the
drawer will scroll to the start of its content.
Expand Down
Expand Up @@ -375,6 +375,14 @@ - (void)setTrackingScrollView:(UIScrollView *)trackingScrollView {
self.bottomDrawerContainerViewController.trackingScrollView = trackingScrollView;
}

- (BOOL)userDraggingEnabled {
return self.bottomDrawerContainerViewController.userDraggingEnabled;
}

- (void)setUserDraggingEnabled:(BOOL)userDraggingEnabled {
self.bottomDrawerContainerViewController.userDraggingEnabled = userDraggingEnabled;
}

- (void)setMaximumInitialDrawerHeight:(CGFloat)maximumInitialDrawerHeight {
_maximumInitialDrawerHeight = maximumInitialDrawerHeight;
self.bottomDrawerContainerViewController.maximumInitialDrawerHeight =
Expand Down
Expand Up @@ -13,9 +13,9 @@
// limitations under the License.

#import <UIKit/UIKit.h>
#import "MaterialElevation.h"
#import "MDCBottomDrawerPresentationController.h"
#import "MDCBottomDrawerState.h"
#import "MaterialElevation.h"
// TODO(b/151929968): Delete import of delegate headers when client code has been migrated to no
// longer import delegates as transitive dependencies.
#import "MDCBottomDrawerViewControllerDelegate.h"
Expand Down Expand Up @@ -161,7 +161,7 @@
Note: This flag is only applicable when @c headerViewController is nil. If @c headerViewController
is non-nil, setting this flag to YES will have no effect.
Defaults to NO.
*/
@property(nonatomic, assign) BOOL shouldUseStickyStatusBar;
Expand Down Expand Up @@ -214,6 +214,9 @@
*/
@property(nonatomic) BOOL shouldDisplayMobileLandscapeFullscreen;

/** Whether the drawer allows the user to drag it or not. */
@property(nonatomic) BOOL userDraggingEnabled;

/**
Sets the top corners radius for an MDCBottomDrawerState drawerState
Expand Down
18 changes: 18 additions & 0 deletions components/NavigationDrawer/src/MDCBottomDrawerViewController.m
Expand Up @@ -297,6 +297,24 @@ - (void)setDrawerShadowColor:(UIColor *)drawerShadowColor {
}
}

- (BOOL)userDraggingEnabled {
if ([self.presentationController isKindOfClass:[MDCBottomDrawerPresentationController class]]) {
MDCBottomDrawerPresentationController *bottomDrawerPresentationController =
(MDCBottomDrawerPresentationController *)self.presentationController;
return bottomDrawerPresentationController.userDraggingEnabled;
} else {
return YES;
}
}

- (void)setUserDraggingEnabled:(BOOL)userDraggingEnabled {
if ([self.presentationController isKindOfClass:[MDCBottomDrawerPresentationController class]]) {
MDCBottomDrawerPresentationController *bottomDrawerPresentationController =
(MDCBottomDrawerPresentationController *)self.presentationController;
bottomDrawerPresentationController.userDraggingEnabled = userDraggingEnabled;
}
}

- (void)setShouldIncludeSafeAreaInContentHeight:(BOOL)shouldIncludeSafeAreaInContentHeight {
_shouldIncludeSafeAreaInContentHeight = shouldIncludeSafeAreaInContentHeight;
if ([self.presentationController isKindOfClass:[MDCBottomDrawerPresentationController class]]) {
Expand Down
Expand Up @@ -151,7 +151,7 @@
Note: This flag is only applicable when @c headerViewController` is nil. If @c headerViewController
is non-nil, setting this flag to YES will have no effect.
Defaults to NO.
*/
@property(nonatomic, assign) BOOL shouldUseStickyStatusBar;
Expand Down Expand Up @@ -189,6 +189,9 @@
*/
@property(nonatomic, assign) BOOL shouldDisplayMobileLandscapeFullscreen;

/** Whether the drawer allows the user to drag it or not. */
@property(nonatomic) BOOL userDraggingEnabled;

/**
Sets the content offset Y of the drawer's content. If contentOffsetY is set to 0, the
drawer will scroll to the start of its content.
Expand Down
Expand Up @@ -420,6 +420,14 @@ - (void)setMaximumInitialDrawerHeight:(CGFloat)maximumInitialDrawerHeight {
}
}

- (BOOL)userDraggingEnabled {
return self.scrollView.scrollEnabled;
}

- (void)setUserDraggingEnabled:(BOOL)userDraggable {
self.scrollView.scrollEnabled = userDraggable;
}

- (void)addScrollViewObserver {
if (self.scrollViewObserved) {
return;
Expand Down
2 changes: 1 addition & 1 deletion demos/supplemental/RemoteImageServiceForMDCDemos.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RemoteImageServiceForMDCDemos"
s.version = "119.4.0"
s.version = "119.5.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"
Expand Down

0 comments on commit 07cab9a

Please sign in to comment.