Skip to content

Commit b339904

Browse files
committed
Add Material Buttons.
Summary: Add Material Buttons component. Test Plan: - Catalog's Buttons target must build and run. - build_tests projects must build and run. Reviewers: ajsecord, lpromero, featherless, #material_components_ios_owners, iangordon Reviewed By: featherless, #material_components_ios_owners Subscribers: featherless Projects: #material_components_ios Differential Revision: http://codereview.cc/D85
1 parent 77e79d6 commit b339904

32 files changed

+2400
-7
lines changed

Catalog.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build_tests/CocoapodsObjCApp/Podfile.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PODS:
22
- material-components-ios (0.1.0):
3+
- material-components-ios/Buttons (= 0.1.0)
34
- material-components-ios/Ink (= 0.1.0)
45
- material-components-ios/PageControl (= 0.1.0)
56
- material-components-ios/private (= 0.1.0)
@@ -9,6 +10,11 @@ PODS:
910
- material-components-ios/Slider (= 0.1.0)
1011
- material-components-ios/SpritedAnimationView (= 0.1.0)
1112
- material-components-ios/Typography (= 0.1.0)
13+
- material-components-ios/Buttons (0.1.0):
14+
- material-components-ios/Ink
15+
- material-components-ios/ShadowElevations
16+
- material-components-ios/ShadowLayer
17+
- material-components-ios/Typography
1218
- material-components-ios/Ink (0.1.0)
1319
- material-components-ios/PageControl (0.1.0)
1420
- material-components-ios/private (0.1.0):
@@ -34,6 +40,6 @@ EXTERNAL SOURCES:
3440
:path: ../../
3541

3642
SPEC CHECKSUMS:
37-
material-components-ios: 90b3d23cebcb2913875bbab015605ebe103b5ab1
43+
material-components-ios: 6cf6a59e466857e0c2caef944a9f26e78806050c
3844

3945
COCOAPODS: 0.39.0

build_tests/CocoapodsSwiftApp/Podfile.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PODS:
22
- material-components-ios (0.1.0):
3+
- material-components-ios/Buttons (= 0.1.0)
34
- material-components-ios/Ink (= 0.1.0)
45
- material-components-ios/PageControl (= 0.1.0)
56
- material-components-ios/private (= 0.1.0)
@@ -9,6 +10,11 @@ PODS:
910
- material-components-ios/Slider (= 0.1.0)
1011
- material-components-ios/SpritedAnimationView (= 0.1.0)
1112
- material-components-ios/Typography (= 0.1.0)
13+
- material-components-ios/Buttons (0.1.0):
14+
- material-components-ios/Ink
15+
- material-components-ios/ShadowElevations
16+
- material-components-ios/ShadowLayer
17+
- material-components-ios/Typography
1218
- material-components-ios/Ink (0.1.0)
1319
- material-components-ios/PageControl (0.1.0)
1420
- material-components-ios/private (0.1.0):
@@ -34,6 +40,6 @@ EXTERNAL SOURCES:
3440
:path: ../../
3541

3642
SPEC CHECKSUMS:
37-
material-components-ios: 90b3d23cebcb2913875bbab015605ebe103b5ab1
43+
material-components-ios: 6cf6a59e466857e0c2caef944a9f26e78806050c
3844

3945
COCOAPODS: 0.39.0

build_tests/classes/objective_c/MDCBuildTestViewController.m

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,23 @@
1616

1717
#import "MDCBuildTestViewController.h"
1818

19+
#import <MaterialButtons.h>
20+
#import <MaterialInk.h>
1921
#import <MaterialPageControl.h>
2022
#import <MaterialSlider.h>
2123
#import <MaterialScrollViewDelegateMultiplexer.h>
24+
#import <MaterialShadowElevations.h>
2225
#import <MaterialShadowLayer.h>
2326
#import <MaterialSpritedAnimationView.h>
2427
#import <MaterialTypography.h>
25-
#import <MaterialInk.h>
2628

2729
@implementation MDCBuildTestViewController
2830

2931
- (void)viewDidLoad {
3032
[super viewDidLoad];
3133
self.view.backgroundColor = [UIColor whiteColor];
3234

33-
// Testing build and linking so all we need to do is touch the component objects.
35+
// Testing build and linking so all we need to do is touch the component objects.
3436
#pragma mark Slider
3537

3638
MDCSlider *slider = [[MDCSlider alloc] initWithFrame:CGRectMake(0, 0, 100, 27)];
@@ -45,12 +47,12 @@ - (void)viewDidLoad {
4547
#pragma mark Ink
4648

4749
NSAssert([[MDCInkTouchController alloc] initWithView:self.view],
48-
@"Expecting to find a valid object for MDCInkTouchController.");
50+
@"Expecting to find a valid object for MDCInkTouchController.");
4951

5052
#pragma mark ScrollViewDelegateMultiplexer
5153

5254
NSAssert([[MDCScrollViewDelegateMultiplexer alloc] init],
53-
@"Expecting to find a valid object for slider.");
55+
@"Expecting to find a valid object for MDCScrollViewDelegateMultiplexer.");
5456

5557
#pragma mark ShadowLayer
5658

@@ -59,7 +61,7 @@ - (void)viewDidLoad {
5961
#pragma mark SpritedAnimation
6062

6163
NSAssert([[MDCSpritedAnimationView alloc] init],
62-
@"Expecting to find a valid object for MDCSpritedAnimationView.");
64+
@"Expecting to find a valid object for MDCSpritedAnimationView.");
6365

6466
#pragma mark PageControl
6567

@@ -69,6 +71,9 @@ - (void)viewDidLoad {
6971
pageControl.center = CGPointMake(100, 145);
7072
NSAssert(pageControl, @"Expecting to find a valid object for MDCPageControl.");
7173

74+
#pragma mark Buttons
75+
76+
NSAssert([[MDCButton alloc] init], @"Expecting to find a valid object for MDCButton.");
7277
}
7378

7479
@end

build_tests/classes/swift/MDCBuildTestViewController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,8 @@ class MDCBuildTestViewController: UIViewController {
5454
pageControl.center = CGPointMake(100, 145);
5555
assert(pageControl.isKindOfClass(MDCPageControl), "Expecting to find a valid object for MDCSpritedAnimationView");
5656

57+
// MARK: Buttons
58+
assert(MDCButton.init().isKindOfClass(MDCButton), "Expecting to find a valid object for MDCButton");
59+
5760
}
5861
}

components/Buttons/.jazzy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module_name: Buttons
2+
umbrella_header: src/MaterialButtons.h
3+
objc_mode: true
4+
sdk: iphonesimulator
5+
output: docs/

0 commit comments

Comments
 (0)