Skip to content

Commit

Permalink
Merge branch 'release-2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
randallli committed Mar 28, 2016
2 parents 8d9725c + f2fc9c6 commit 7341a00
Show file tree
Hide file tree
Showing 92 changed files with 1,979 additions and 736 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/docs
build_tests/CocoapodsObjCApp/CocoapodsObjCApp.xcworkspace
build_tests/CocoapodsSwiftApp/CocoapodsSwiftApp.xcworkspace
scripts/external/material-design-icons/

# Xcode
#
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,39 @@

##### Bug Fixes

## 2.2.0

##### Deprecations

* [Typography] Marked FontResource deprecated. Use the renamed component as FontDiskLoader. (randallli)

##### Enhancements

* [AppBar Example] Addressing code style feedback from D326. (Jeff Verkoeyen)
* [AppBar] Add typical Swift usage example. (Jeff Verkoeyen)
* [AppBar] Add UINavigatonItem section. (Jeff Verkoeyen)
* [AppBar] readme updates. (Jeff Verkoeyen)
* [AppBar] Remove unnecessary code from the ObjC example. (Jeff Verkoeyen)
* [AppBar] Standardize and document the examples in preparation for upcoming examples. (Jeff Verkoeyen)
* [AppBar] Use the catalog's blue color in the examples. (Jeff Verkoeyen)
* [Button] Change ink color on buttons to improve visibility of ink (Junius Gunaratne)
* [Catalog] Miscellaneous cleanup and fixes to the Catalog. (Jeff Verkoeyen)
* [Catalog] Update catalog home screen to new light themed design (Junius Gunaratne)
* [Docs] Navigationbar initial markdown formatting. (Jason Striegel)
* [FlexibleHeader] Assert that the tracking scroll view has a delegate. (Jeff Verkoeyen)
* [FlexibleHeader] Only call sizeToFit on the flexible header view when it does not have a tracking scroll view. (Jeff Verkoeyen)
* [FlexibleHeader] Poke the header into laying out its content when the view controller has been fully registered. (Jeff Verkoeyen)
* [FontDiskLoader] Revived old class, MDCFontResource, and marked it deprecated. (randallli)
* [Icons] Add private/ directory to Icons target. (Jeff Verkoeyen)
* [Icons] Added component (Jeff Verkoeyen)
* [Icons] Bundles can't have plusses in their names. (Jeff Verkoeyen)
* [Ink] markdown formatting. (Jason Striegel)
* [Ink] Minor tweaks to ink for more consistency with other platforms (Junius Gunaratne)
* [Site] Remove alternate remotes from build-site remote determination. (Jeff Verkoeyen)
* [Site] Updates to top links and markdown formatting. (Jason Striegel)
* [Site] Using HTML markup for lists to avoid github comment issue. (Jason Striegel)
* [Typography] Moved the FontLoader and FontResource into their own components. (randallli)

## 2.1.1

##### Enhancements
Expand Down
45 changes: 34 additions & 11 deletions MaterialComponents.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
load 'scripts/generated/icons.rb'

Pod::Spec.new do |s|
s.name = "MaterialComponents"
s.version = "2.1.1"
s.version = "2.2.0"
s.authors = { 'Apple platform engineering at Google' => '[email protected]' }
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
s.homepage = "https://github.com/google/material-components-ios"
Expand Down Expand Up @@ -41,20 +43,18 @@ Pod::Spec.new do |s|
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}", "components/#{ss.base_name}/src/private/*.{h,m}"
ss.header_mappings_dir = "components/#{ss.base_name}/src/*"

ss.resource_bundles = {
"Material#{ss.base_name}" => ["components/#{ss.base_name}/src/Material#{ss.base_name}.bundle/Images.xcassets/*/*.png"]
}

# Navigation bar contents
ss.dependency "MaterialComponents/Buttons"
ss.dependency "MaterialComponents/HeaderStackView"
ss.dependency "MaterialComponents/NavigationBar"
ss.dependency "MaterialComponents/Typography"

# Flexible header + shadow
ss.dependency "MaterialComponents/FlexibleHeader"
ss.dependency "MaterialComponents/ShadowElevations"
ss.dependency "MaterialComponents/ShadowLayer"

ss.dependency "MaterialComponents/private/Icons/ic_arrow_back"
end

s.subspec "Buttons" do |ss|
Expand All @@ -80,6 +80,14 @@ Pod::Spec.new do |s|
ss.header_mappings_dir = "components/#{ss.base_name}/src/*"
end

s.subspec "FontDiskLoader" do |ss|
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.header_mappings_dir = "components/#{ss.base_name}/src/*"

ss.framework = "CoreText"
end

s.subspec "HeaderStackView" do |ss|
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}"
Expand Down Expand Up @@ -110,6 +118,22 @@ Pod::Spec.new do |s|
}
end

s.subspec "RobotoFontLoader" do |ss|
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.header_mappings_dir = "components/#{ss.base_name}/src/*"

# Only if you have a resource bundle
ss.resource_bundles = {
"Material#{ss.base_name}" => ["components/#{ss.base_name}/src/Material#{ss.base_name}.bundle/*"]
}

ss.dependency "MaterialComponents/FontDiskLoader"
# TODO: Make MDCRobotoFontLoader conform to the <MDCTypographyFontLoading>. This was intended to be a
# strong dependancy but is weak during the deprecation period.
# ss.dependency "MaterialComponents/Typography"
end

s.subspec "ScrollViewDelegateMultiplexer" do |ss|
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}"
Expand Down Expand Up @@ -157,15 +181,14 @@ Pod::Spec.new do |s|
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.header_mappings_dir = "components/#{ss.base_name}/src/*"
ss.framework = "CoreText"

ss.resource_bundles = {
"Material#{ss.base_name}" => ["components/#{ss.base_name}/src/Material#{ss.base_name}.bundle/*"]
}
ss.framework = "CoreText"
ss.dependency "MaterialComponents/RobotoFontLoader" # This dependancy is part of a deprecation.
end

s.subspec "private" do |pss|

# The implementation of this method is generated by running scripts/sync_icons.sh
registerIcons(pss)

pss.subspec "Color" do |ss|
ss.public_header_files = "components/private/#{ss.base_name}/src/*.h"
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 = "2.1.1"
s.version = "2.2.0"
s.authors = { 'Apple platform engineering at Google' => '[email protected]' }
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
s.homepage = "https://github.com/google/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 = "2.1.1"
s.version = "2.2.0"
s.authors = { 'Apple platform engineering at Google' => '[email protected]' }
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
s.homepage = "https://github.com/google/material-components-ios"
Expand Down
4 changes: 0 additions & 4 deletions catalog/MDCCatalog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
665A34E01C6BDB4600962055 /* Runtime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 665A34DF1C6BDB4600962055 /* Runtime.swift */; };
DE309CF31C8DEB8400E73247 /* MDCCatalogComponentsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE309CF21C8DEB8400E73247 /* MDCCatalogComponentsController.swift */; };
DEF64EA41C8DEE83007C4EA0 /* MDCCatalogCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEF64EA31C8DEE83007C4EA0 /* MDCCatalogCollectionViewCell.swift */; };
DEF64EA61C8DEFC7007C4EA0 /* MDCCatalogHeaderContainerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEF64EA51C8DEFC7007C4EA0 /* MDCCatalogHeaderContainerController.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -80,7 +79,6 @@
BFBFBC9BA56EED442714E5F3 /* Pods-MDCCatalog.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MDCCatalog.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MDCCatalog/Pods-MDCCatalog.debug.xcconfig"; sourceTree = "<group>"; };
DE309CF21C8DEB8400E73247 /* MDCCatalogComponentsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MDCCatalogComponentsController.swift; sourceTree = "<group>"; };
DEF64EA31C8DEE83007C4EA0 /* MDCCatalogCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MDCCatalogCollectionViewCell.swift; sourceTree = "<group>"; };
DEF64EA51C8DEFC7007C4EA0 /* MDCCatalogHeaderContainerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MDCCatalogHeaderContainerController.swift; sourceTree = "<group>"; };
DEFF1C057348FFB1866CD023 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
FBDDFF6A49F084B665BA398A /* Pods-MDCCatalog-MDCCatalog.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MDCCatalog-MDCCatalog.release.xcconfig"; path = "Pods/Target Support Files/Pods-MDCCatalog-MDCCatalog/Pods-MDCCatalog-MDCCatalog.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -130,7 +128,6 @@
665A34D91C6BD01900962055 /* MDCCatalog-Bridging-Header.h */,
DEF64EA31C8DEE83007C4EA0 /* MDCCatalogCollectionViewCell.swift */,
DE309CF21C8DEB8400E73247 /* MDCCatalogComponentsController.swift */,
DEF64EA51C8DEFC7007C4EA0 /* MDCCatalogHeaderContainerController.swift */,
664524B81C6BA62A001ADBF8 /* NodeViewController.swift */,
665A34DD1C6BDADA00962055 /* Reflection */,
665A34DE1C6BDAE700962055 /* Resources */,
Expand Down Expand Up @@ -349,7 +346,6 @@
664524B91C6BA62A001ADBF8 /* NodeViewController.swift in Sources */,
664524B71C6BA62A001ADBF8 /* AppDelegate.swift in Sources */,
DEF64EA41C8DEE83007C4EA0 /* MDCCatalogCollectionViewCell.swift in Sources */,
DEF64EA61C8DEFC7007C4EA0 /* MDCCatalogHeaderContainerController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion catalog/MDCCatalog/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
node.viewController = c
}

let rootNodeViewController = MDCCatalogHeaderContainerController(node: tree)
let rootNodeViewController = MDCCatalogComponentsController(node: tree)
let navigationController = UINavigationController(rootViewController: rootNodeViewController)

// In the event that an example view controller hides the navigation bar we generally want to
Expand Down
Binary file not shown.
12 changes: 12 additions & 0 deletions catalog/MDCCatalog/Assets.xcassets/App Bar.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "AppBar.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified catalog/MDCCatalog/Assets.xcassets/Ink.imageset/Ink.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions catalog/MDCCatalog/Assets.xcassets/Misc.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Misc.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.
Binary file not shown.
Binary file modified catalog/MDCCatalog/Assets.xcassets/Shadows.imageset/Shadows.pdf
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "SpritedAnimationView.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.
Binary file modified catalog/MDCCatalog/Assets.xcassets/Switch.imageset/Switch.pdf
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions catalog/MDCCatalog/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand Down
20 changes: 8 additions & 12 deletions catalog/MDCCatalog/MDCCatalogCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ class MDCCatalogCollectionViewCell: UICollectionViewCell {

override init(frame: CGRect) {
super.init(frame: frame)
imageView.alpha = 0.5
imageView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
imageView.contentMode = .ScaleAspectFill;
self.addSubview(imageView)
label.textColor = UIColor.whiteColor()
label.font = MDCTypography.subheadFont()
label.textColor = UIColor(white: 0.2, alpha: 1)
label.font = MDCTypography.captionFont()
self.addSubview(label)
self.clipsToBounds = true
}
Expand All @@ -43,26 +44,21 @@ class MDCCatalogCollectionViewCell: UICollectionViewCell {

override func layoutSubviews() {
super.layoutSubviews()
label.sizeToFit()
label.frame = CGRectMake(pad, frame.height - label.frame.height - pad,
frame.width - pad * 2, label.frame.height)
imageView.frame = self.bounds
}

override func prepareForReuse() {
super.prepareForReuse()

label.text = ""
imageView.image = nil
}

func populateView(componentName: String, image: UIImage) {
label.text = componentName
label.sizeToFit()
label.frame = CGRectMake(pad, frame.height - label.frame.height - pad,
frame.width - pad * 2, label.frame.height)

imageView.image = image
imageView.sizeToFit()
imageView.frame = CGRectMake((frame.width - imageView.frame.width) / 2,
(frame.height - imageView.frame.height) / 2 - pad,
imageView.frame.width, imageView.frame.height)
}

}
Loading

0 comments on commit 7341a00

Please sign in to comment.