11 Commits

Author SHA1 Message Date
featherless
be33d3196a
[Cards] Fix bug in the "Typical use" example where the image would not appear. (#8943)
The image was not appearing because the card using a custom image view that was trying to inherit the mask of the card's shape layer.

This change removes the custom image view and instead applies custom corner radii to the image view directly. This is not ideal, but is an improvement. Ideally, the card would provide a content view that is clipped to the card's shape. It's not possible to enable clipping on the card itself because this causes the shadow to go away.

| Before | After |
|:--|:--|
| ![Simulator Screen Shot - iPhone Xʀ - 2019-11-15 at 12 57 37](https://user-images.githubusercontent.com/45670/68964703-08b1ed80-07a8-11ea-978c-2c71145ca8c3.png) | ![Simulator Screen Shot - iPhone Xʀ - 2019-11-15 at 12 56 52](https://user-images.githubusercontent.com/45670/68964693-02bc0c80-07a8-11ea-9d3d-644b81aebee6.png) |

Part of https://github.com/material-components/material-components-ios/issues/8861
2019-11-15 16:44:28 -05:00
featherless
f6f2ff2821
[Cards] Make the "Typical use" example title label an a11y heading. (#8945)
Closes https://github.com/material-components/material-components-ios/issues/8861
2019-11-15 14:06:21 -05:00
Galia Kaufman
8c103b0fc9
[Cards] New toggle-button example (#8663)
Adding an exampled for a custom Toggle Button in Cards.
2019-10-28 12:47:22 -04:00
Andrew Overton
538a90cc4b Revert "[Cards] New toggle-button example (#8574)"
This reverts commit 89983ffbf4a9ed5852ab0d7f9b3548fa93a3bd1a.
2019-10-23 14:19:29 -04:00
Galia Kaufman
89983ffbf4
[Cards] New toggle-button example (#8574)
Adding a code sample for a white Toggle Button example in Cards.
2019-10-21 10:10:24 -04:00
Robert Moore
bf099ab14f
[Cards] Fix example IBOutlet (#4827)
When running internally, the `view` property didn't have an IBOutlet binding.
This caused a crash.

|Before|After|
|--|--|
|![card-iboutlet-before](https://user-images.githubusercontent.com/1753199/44282685-dd012a00-a229-11e8-8163-c3bb7fe10a3e.png)|![card-iboutlet-after](https://user-images.githubusercontent.com/1753199/44282698-e38fa180-a229-11e8-9cdb-083fa5ce688f.png)|
2018-08-17 15:29:47 -04:00
Galia Kaufman
f040e95bff
[Cards] accessibility example for collection cards (#4488)
Updating the Cards "Edit/Recorder" example to demonstrate accessibility for tappable cards that are part of a collection.
2018-07-30 14:21:09 -04:00
Yarden Eitan
27a6c46fc3
[Cards] Added interactability toggle to Cards (#4404)
After a discussion with design we have concluded that a card as a whole doesn't need to be interactable as long as there are other interactable components in its content. As an example, a card that has a button can remove its interactability and allow the button to operate as the interactable entity.

This PR includes:

addition of the isInteractable boolean for MDCCard and MDCCardCollectionCell.
Update to our Card examples to show this change.
Update unit tests for Cards to test the new property.
Small fix to the card example.
This unblocks #4261
2018-06-26 16:39:40 -04:00
featherless
7f9f54d5cb
[Cards] Replace MDCFlatButton with text button themer in CardExampleViewController. (#3584)
Also fixes a bug where the button was being initialized as a system button instead of as a custom button. This was affecting the highlighted text state.

Pivotal story: https://www.pivotaltracker.com/story/show/157189842

Before (normal / highlighted):

![simulator screen shot - iphone se - 2018-04-30 at 09 31 27](https://user-images.githubusercontent.com/45670/39429671-99e1d420-4c59-11e8-82a1-f1d1a1962298.png) ![simulator screen shot - iphone se - 2018-04-30 at 09 31 28](https://user-images.githubusercontent.com/45670/39429672-9a0db194-4c59-11e8-93f6-dbe9d0615350.png)

After (normal / highlighted):

![simulator screen shot - iphone se - 2018-04-30 at 09 30 31](https://user-images.githubusercontent.com/45670/39429684-a7e0218a-4c59-11e8-991b-c59d96c74e83.png) ![simulator screen shot - iphone se - 2018-04-30 at 09 30 33](https://user-images.githubusercontent.com/45670/39429685-a914b0e8-4c59-11e8-84cf-fd77448ba421.png)
2018-04-30 12:49:06 -04:00
ianegordon
117864b0b5
[CollectionCells] Add demonstration of #2911 (#2930)
* [CollectionCells] Add demonstration of #2912

* FB
2018-02-14 14:04:12 -05:00
Yarden Eitan
58f24b4f18 [Cards] Initial Implementation (#2894)
* [Cards] New API Header files (#2886)

* header files

* rename to MDCCardCollectionCell

* update for review

* update to review

* update to review

* [Cards] Full Implementation (#2892)

* cards core implementation

* updates to API and fixes from doc

* small fixes

* podspec, examples, and tests

* small fixes

* small fix

* small fix

* update inkView API and some small nits

* refactor API and code

* refactor API and code

* remove private header

* rename to MDCCardCollectionCell

* updates to api review

* update based on reviews

* fix tests

* [Cards] Initial Docs

* updates to encoding

* small fix

* pr update

* pr update

* pr update

* pr update

* pr update

* pr update

* pr update

* ink api update

* ink api update
2018-02-01 18:45:43 -05:00