6 Commits

Author SHA1 Message Date
Mohammad Cazi
ece3c1457b [MDCButton] Added new API for coloring image tint color for state. (#3423)
Examples updated.
Unit Test Written.
![screen shot 2018-04-20 at 1 14 17 pm](https://user-images.githubusercontent.com/36271115/39064922-27f71680-449e-11e8-99fb-9fcd0e69d870.png)
![screen shot 2018-04-20 at 1 14 21 pm](https://user-images.githubusercontent.com/36271115/39064929-2be07ffc-449e-11e8-820b-7812cbb8d382.png)
2018-04-20 17:10:41 -04:00
Mohammad Cazi
82d19ae5d0 [Buttons] Create a separate class for MDCFloatingButton color themer. (#3429)
Added MDCFloatingButtonColorThemer to color theme a floating button.
examples and tests are updated.

![screen shot 2018-04-20 at 1 14 17 pm](https://user-images.githubusercontent.com/36271115/39068266-baf19f22-44a9-11e8-9eaa-fe58d74dd804.png)
2018-04-20 16:43:27 -04:00
Mohammad Cazi
c818048a1c
[MDCFloatingButton] Color Themer added. (#3381)
* MDCFloatingButton Color Themer added.
No support for icon color change inside color themer, this is left for user to handle for now.
Example added.
Pivotal: https://www.pivotaltracker.com/story/show/156725760

* Remove redundancy in tests and FabButtonColorThemer.

* Adding another example for color theming of a button.

* Setting secondary color for the test instead of primary since that's the value that's being used.

PR: https://github.com/material-components/material-components-ios/pull/3381
2018-04-18 15:32:53 -04:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Randall Li
b1ec22207f
Fixed float conversion build errors (#2602)
* Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480

* More Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480
2017-12-06 15:57:04 -05:00
Robert Moore
2d8333d7d8 [Buttons] Extended FAB (#2563)
* [Buttons] Remove .largeIcon shape from FloatingButton (#2513)

The LargeIcon shape is not required, since the same behavior (support
for 36-point images) can be achieved by setting the contentEdgeInsets to
.zero.

Also updates one of the button examples to use a 36-point icon.

* [Buttons] Add extended FAB layout code (#2528)

Creating (internal for now) the required properties and layout code to support
the extended FAB. Unit tests to confirm the behavior and some minor
adjustments to existing values like default contentEdgeInsets values.

Implements #2495

* [Buttons] Expose Extended FAB properties (#2543)

Making the new properties public and also migrating away from simple
property setters to the new forShape:inMode: setters required for
UIAppearance support.

* minimumSize
* maximumSize
* contentEdgeInsets
* hitAreaInsets

Implements #2495

* [Buttons] Add basic Floating Button example (#2554)

Includes automatic adjustment of extended/normal layout depending on size
classes.

Demonstrates #2495

* [Buttons] Update README for Extended FAB (#2561)

The README includes usage examples for the FAB. Adding a section to
demonstrate how to configure the FAB in its different shapes and modes.

Documents #2495
2017-12-04 12:55:55 -05:00