Skip to content

Commit

Permalink
Merge branch 'release-candidate'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Morrison committed Aug 3, 2017
2 parents 4c47b82 + 5daa912 commit 8f9e066
Show file tree
Hide file tree
Showing 69 changed files with 2,924 additions and 837 deletions.
121 changes: 120 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,122 @@
# 30.0.0

## API Diffs

### Collections

* Added 'shouldHideSeparatorForCellLayoutAttributes' to MDCCollectionViewStyling protocol.
* Added three methods to MDCCollectionViewStylingDelegate for optionally hiding cell separators.

### MaskedTransitioning

* New component that makes it easy to animate between two view controllers using an expanding mask effect.

### TextFields

* Added 'leadingView' and 'leadingViewMode' properties to MDCTextField.
* Renamed MDCTextFieldPositioningDelegate method 'textContainerInset:' to 'textInsets:'
* Added 'enabled', 'textInsets', 'trailingView' and 'trailingViewMode' properties to MDCTextInput.

### Typography

* Changed nullability of 'lightFontOfSize', 'mediumFontOfSize' and 'boldItalicFontOfSize' methods from nonnull to nullable.

## Component changes

### ButtonBar

#### Changes

* [[Themer] Avoid deprecation warning on iOS 9+ targets (#1700)](https://github.com/material-components/material-components-ios/commit/68d21a901edccd0ffffc9ed11ed067dc22e7b3d9) (ianegordon)

### Buttons

#### Changes

* [Add a stroked button to the examples (#1714)](https://github.com/material-components/material-components-ios/commit/04b8ced5a4b7971ad1dddb98bc9191ae8dff9a12) (Sam Morrison)
* [Fix storyboard backgroundColor assignment (#1706)](https://github.com/material-components/material-components-ios/commit/057a430b4b8d059a00b1f4e01930c71c6b20eaff) (Sam Morrison)
* [Reset Ink when moved to new superview (#1656)](https://github.com/material-components/material-components-ios/commit/4110e30ef23e7d5c007d07e676e8fc0c06bf87c9) (Robert Moore)
* [Set default title color of MDCFlatButton to black (#1725)](https://github.com/material-components/material-components-ios/commit/f1059f6aa9c85f52388a9525fd15603f3b925356) (Sam Morrison)
* [Unbounded ink aligns to content insets (#1670)](https://github.com/material-components/material-components-ios/commit/cafcbe3544c6bcbb1725e8f7ccdf5bb008760205) (Robert Moore)
* [Undo MDCFlatButton title color changes (#1681)](https://github.com/material-components/material-components-ios/commit/f4c76013577bc05f1bbdbcc50e1700db6766b9c9) (Sam Morrison)

### CollectionCells

#### Changes

* [[Collections] Extend cell label to superview width (#1661)](https://github.com/material-components/material-components-ios/commit/6785e7a0d33cb3a832cd96debe2a9e960967a059) (Robert Moore)
* [[Collections] Only change selected icon if needed (#1692)](https://github.com/material-components/material-components-ios/commit/44e7c7974b557d0e0e670e50390fd997e56723d7) (Robert Moore)
* [[Collections] Reuse label frames (#1705)](https://github.com/material-components/material-components-ios/commit/c1ce8bcca184a2a31c8af15da42294c450c2e13c) (ianegordon)

### Collections

#### Changes

* [Add "editing" performance example (#1710)](https://github.com/material-components/material-components-ios/commit/14e00b76ce457ca0538056b04bfb8f14d73f74f1) (Robert Moore)
* [Add StylingDelegate methods to control separator display (#1627)](https://github.com/material-components/material-components-ios/commit/14496a33a24652e0df175c2907eee543b6b06fd5) (Gauthier Ambard)

### Dialogs

#### Changes

* [Add Issue number. (#1727)](https://github.com/material-components/material-components-ios/commit/b8f8bfef9c13c06e0030b22398c8a0a8a33cde9e) (ianegordon)

### FeatureHighlight

#### Changes

* [Correctly handle ended and cancelled touches (#1684)](https://github.com/material-components/material-components-ios/commit/cfbb1d9862b5d52e32376caff4f71ef92f2c3041) (Sam Morrison)

### Ink

#### Changes

* [Don't assign compositeRipple frame twice (#1687)](https://github.com/material-components/material-components-ios/commit/756728d0b05eddfc2a9b0b6594c4ba03e6ce60a4) (Robert Moore)
* [[Buttons] Reset Ink when moved to new superview (#1656)](https://github.com/material-components/material-components-ios/commit/4110e30ef23e7d5c007d07e676e8fc0c06bf87c9) (Robert Moore)

### MaskedTransition

#### Changes

* [Add Masked Transition component. (#1513)](https://github.com/material-components/material-components-ios/commit/61acb1cbb09327f24acbebda2f9909a4fd9435fe) (featherless)

### Snackbar

#### Changes

* [Notify MDCOverlayObservers of bottom offset changes (#1659)](https://github.com/material-components/material-components-ios/commit/392ac852614b72324cd7a3ee77ed20757ccd1f7f) (Sam Morrison)

### TextFields

#### Changes

* [Alphabetizing propertys. (#1691)](https://github.com/material-components/material-components-ios/commit/695dc6d5763ca041a8967ded7499af6e8db545b4) (Will Larche)
* [Comment grammar correction. (#1695)](https://github.com/material-components/material-components-ios/commit/3e135694ab954cc7dfe71b9cac77d376c04b74da) (Will Larche)
* [Constraint correction and cleanup. (#1665)](https://github.com/material-components/material-components-ios/commit/df0d4cbd297284d783358a4cbdbda555d7ab63d5) (Will Larche)
* [Fundament implementation of trailingViewMode. (#1702)](https://github.com/material-components/material-components-ios/commit/ca879cf159a5c3e69d89b465814579db46b591b9) (Will Larche)
* [Making enabled mandatory. (#1679)](https://github.com/material-components/material-components-ios/commit/0578ca3635729c00a16c89c63715154ae8269ddc) (Will Larche)
* [Making textInsets mandatory. (#1697)](https://github.com/material-components/material-components-ios/commit/31810b8872ad1335889809d918deebcbce8970b4) (Will Larche)
* [Moving two propertys to be below the correct pragma mark. (#1703)](https://github.com/material-components/material-components-ios/commit/b005771b19a0928bcd5403daea33490164e7a8e2) (Will Larche)
* [Overlay views. (#1676)](https://github.com/material-components/material-components-ios/commit/9cb9a209c5449e4de2a25dce530c25184c5f0d46) (Will Larche)
* [Renaming a tests file. (#1718)](https://github.com/material-components/material-components-ios/commit/80f7a1b58d5f1bed1a7561c15c77d00e20b40f2a) (Will Larche)
* [Reorganizing and internal clean up (#1677)](https://github.com/material-components/material-components-ios/commit/1920ec92092060cb3209defc9dfca5e000b37619) (Will Larche)
* [Tests for default priorities of constraints. (#1678)](https://github.com/material-components/material-components-ios/commit/ff618a457a21f074a3ef1ad2f8e2a6c8543311af) (Will Larche)
* [[TextField] Add color themer for text fields (#1666)](https://github.com/material-components/material-components-ios/commit/c3d24b71840fff47849a0b1bb0d44f0f6b3252d9) (Junius Gunaratne)
* [[Textfields] Better naming two tests (#1704)](https://github.com/material-components/material-components-ios/commit/b73c23cf1822122d5cba4d7e3ec046db7533c784) (Will Larche)

### Themes

#### Changes

* [[TextField] Add color themer for text fields (#1666)](https://github.com/material-components/material-components-ios/commit/c3d24b71840fff47849a0b1bb0d44f0f6b3252d9) (Junius Gunaratne)

### Typography

#### Changes

* [Fixing nullability attributes for fonts (#1696)](https://github.com/material-components/material-components-ios/commit/a2968c6decbc88226db868ffb6f8b4eb6ad6ea36) (Robert Moore)
* [[Fonts] Cache system fonts (#1689)](https://github.com/material-components/material-components-ios/commit/ebabb3385a8528e0e1bf9044d542ba9f12e01ed4) (Robert Moore)

# 29.0.0

* Reverts changes to the title color of MDCFlatButton and MDCRaisedButton.
Expand All @@ -17,7 +136,7 @@

### Icons

* For each icon in MDCIcons we now have
* For each icon in MDCIcons we now have a method that returns a UIImage.

### TextFields

Expand Down
37 changes: 28 additions & 9 deletions 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 |s|
s.name = "MaterialComponents"
s.version = "29.0.0"
s.version = "30.0.0"
s.authors = "The Material Components authors."
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
s.homepage = "https://github.com/material-components/material-components-ios"
Expand Down Expand Up @@ -280,6 +280,16 @@ Pod::Spec.new do |s|
end
end

s.subspec "MaskedTransition" do |ss|
ss.ios.deployment_target = '8.0'
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}", "components/#{ss.base_name}/src/private/*.{h,m}"

ss.dependency "MotionTransitioning", "~> 3.0"
ss.dependency "MotionAnimator", "~> 1.0"
ss.dependency "MotionInterchange", "~> 1.0"
end

s.subspec "NavigationBar" do |ss|
ss.subspec "Component" do |sss|
sss.ios.deployment_target = '8.0'
Expand Down Expand Up @@ -417,16 +427,25 @@ Pod::Spec.new do |s|
end

s.subspec "TextFields" do |ss|
ss.ios.deployment_target = '8.0'
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}", "components/#{ss.base_name}/src/private/*.{h,m}"
ss.subspec "Component" do |sss|
sss.ios.deployment_target = '8.0'
sss.public_header_files = "components/#{ss.base_name}/src/*.h"
sss.source_files = "components/#{ss.base_name}/src/*.{h,m}", "components/#{ss.base_name}/src/private/*.{h,m}"

ss.dependency "MaterialComponents/AnimationTiming"
ss.dependency "MaterialComponents/Palettes"
ss.dependency "MaterialComponents/Typography"
sss.dependency "MaterialComponents/AnimationTiming"
sss.dependency "MaterialComponents/Palettes"
sss.dependency "MaterialComponents/Typography"

ss.dependency "MaterialComponents/private/Math"
ss.dependency "MaterialComponents/private/RTL"
sss.dependency "MaterialComponents/private/Math"
sss.dependency "MaterialComponents/private/RTL"
end
ss.subspec "ColorThemer" do |sss|
sss.ios.deployment_target = '8.0'
sss.public_header_files = "components/#{ss.base_name}/src/#{sss.base_name}/*.h"
sss.source_files = "components/#{ss.base_name}/src/#{sss.base_name}/*.{h,m}"
sss.dependency "MaterialComponents/TextFields/Component"
sss.dependency "MaterialComponents/Themes"
end
end

s.subspec "Themes" do |ss|
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsCatalog.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsCatalog"
s.version = "29.0.0"
s.version = "30.0.0"
s.authors = "The Material Components authors."
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
s.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 = "29.0.0"
s.version = "30.0.0"
s.authors = "The Material Components authors."
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
s.homepage = "https://github.com/material-components/material-components-ios"
Expand Down
2 changes: 1 addition & 1 deletion MaterialComponentsUnitTests.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MaterialComponentsUnitTests"
s.version = "29.0.0"
s.version = "30.0.0"
s.authors = "The Material Components authors."
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
s.homepage = "https://github.com/material-components/material-components-ios"
Expand Down
1 change: 1 addition & 0 deletions catalog/MDCCatalog/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
MDCProgressViewColorThemer.apply(colorScheme, to: MDCProgressView.appearance())
MDCSliderColorThemer.apply(colorScheme, to: MDCSlider.appearance())
MDCTabBarColorThemer.apply(colorScheme, to: MDCTabBar.appearance())
MDCTextFieldColorThemer.applyColorScheme(toAllTextInputControllerDefault: colorScheme)

// Apply color scheme to UIKit components.
UISlider.appearance().tintColor = colorScheme?.primaryColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ + (void)applyColorScheme:(NSObject<MDCColorScheme> *)colorScheme
// When a button bar is contained in a navigation bar do not color the button bar. This is useful
// for when an app bar with imagery in the flexible header has a button bar. If the button bar has
// a color then the imagery is obstucted by the solid color of the button bar.
[MDCButtonBar appearanceWhenContainedIn:[MDCNavigationBar class], nil].backgroundColor
= nil;
#if defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_9_0
[MDCButtonBar appearanceWhenContainedInInstancesOfClasses:@[[MDCNavigationBar class]]]
.backgroundColor = nil;
#else
[MDCButtonBar appearanceWhenContainedIn:[MDCNavigationBar class], nil].backgroundColor = nil;
#endif
}

@end
16 changes: 14 additions & 2 deletions components/Buttons/examples/ButtonsContentEdgeInsetsExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ @interface ButtonsContentEdgeInsetsExample : UIViewController
@property(weak, nonatomic) IBOutlet MDCFlatButton *flatButton;
@property(weak, nonatomic) IBOutlet MDCRaisedButton *raisedButton;
@property(weak, nonatomic) IBOutlet MDCFloatingButton *floatingActionButton;
@property (weak, nonatomic) IBOutlet UISwitch *inkBoundingSwitch;

@end

Expand All @@ -45,10 +46,21 @@ - (void)viewDidLoad {
[self.flatButton setBackgroundColor:[UIColor colorWithWhite:0.2 alpha:1.0]
forState:UIControlStateNormal];
self.flatButton.inkColor = [UIColor colorWithWhite:1.0 alpha:0.1];

self.flatButton.contentEdgeInsets = UIEdgeInsetsMake(64, 64, 0, 0);
self.raisedButton.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 64, 64);
self.floatingActionButton.contentEdgeInsets = UIEdgeInsetsMake(0, 128, 0, 0);
self.floatingActionButton.contentEdgeInsets = UIEdgeInsetsMake(40, 40, 0, 0);

[self updateInkStyle:self.inkBoundingSwitch.isOn ? MDCInkStyleBounded : MDCInkStyleUnbounded];
}

- (void)updateInkStyle:(MDCInkStyle)inkStyle {
self.flatButton.inkStyle = inkStyle;
self.raisedButton.inkStyle = inkStyle;
self.floatingActionButton.inkStyle = inkStyle;
}

- (IBAction)didChangeInkStyle:(UISwitch *)sender {
[self updateInkStyle:sender.isOn ? MDCInkStyleBounded : MDCInkStyleUnbounded];
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class ButtonsSwiftAndStoryboardController: UIViewController {
let flatButton = MDCFlatButton()
let floatingButton = MDCFloatingButton()

// UIAppearance colors will overwrite values set in storyboards. In order to see the values set in
// ButtonsStoryboardAndProgrammatic.storyboard comment out the MDCButtonColorThemer.apply(...)
// call in AppDelegate.swift.
@IBOutlet weak var storyboardRaised: MDCRaisedButton!
@IBOutlet weak var storyboardFlat: MDCFlatButton!
@IBOutlet weak var storyboardFloating: MDCFloatingButton!
Expand Down
55 changes: 45 additions & 10 deletions components/Buttons/examples/ButtonsTypicalUse.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ @interface ButtonsTypicalUseViewController ()

@implementation ButtonsTypicalUseViewController

- (MDCButton *)buildCustomStrokedButton {
MDCButton *button = [[MDCButton alloc] init];
[button setBackgroundColor:[UIColor clearColor]
forState:UIControlStateNormal];
[button setTitleColor:[UIColor colorWithWhite:0.1 alpha:1.0]
forState:UIControlStateNormal];
button.inkColor = [UIColor colorWithWhite:0 alpha:0.06];
button.layer.borderWidth = 1;
button.layer.borderColor = [UIColor blackColor].CGColor;
button.disabledAlpha = 0.38;
return button;
}

- (void)viewDidLoad {
[super viewDidLoad];

Expand Down Expand Up @@ -81,6 +94,29 @@ - (void)viewDidLoad {
disabledFlatButton.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:disabledFlatButton];

// Custom stroked button

MDCButton *strokedButton = [self buildCustomStrokedButton];
[strokedButton setTitle:@"Button" forState:UIControlStateNormal];
[strokedButton sizeToFit];
[strokedButton addTarget:self
action:@selector(didTap:)
forControlEvents:UIControlEventTouchUpInside];
strokedButton.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:strokedButton];

// Disabled custom stroked button

MDCButton *disabledStrokedButton = [self buildCustomStrokedButton];
[disabledStrokedButton setTitle:@"Button" forState:UIControlStateNormal];
[disabledStrokedButton sizeToFit];
[disabledStrokedButton addTarget:self
action:@selector(didTap:)
forControlEvents:UIControlEventTouchUpInside];
[disabledStrokedButton setEnabled:NO];
disabledStrokedButton.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:disabledStrokedButton];

// Floating action button

MDCFloatingButton *floatingButton = [[MDCFloatingButton alloc] init];
Expand All @@ -95,16 +131,15 @@ - (void)viewDidLoad {
[floatingButton setImage:plusImage forState:UIControlStateNormal];
[self.view addSubview:floatingButton];

NSDictionary *views = @{
@"raised" : raisedButton,
@"disabledRaised" : disabledRaisedButton,
@"flat" : flatButton,
@"disabledFlat" : disabledFlatButton,
@"floating" : floatingButton
};

self.views = [NSMutableDictionary dictionary];
[self.views addEntriesFromDictionary:views];
self.buttons = @[
raisedButton,
disabledRaisedButton,
flatButton,
disabledFlatButton,
strokedButton,
disabledStrokedButton,
floatingButton
];

[self setupExampleViews];
}
Expand Down
Loading

0 comments on commit 8f9e066

Please sign in to comment.