158 Commits

Author SHA1 Message Date
Cody Weaver
c4e442c1f2 #MDC Delete failing unit tests due to xcode 15.1
PiperOrigin-RevId: 606695775
2024-02-13 11:43:49 -08:00
Nobody
58f6375b10 Internal change
PiperOrigin-RevId: 565513516
2023-09-14 16:45:39 -07:00
Wenyu Zhang
9fc1bebed8 Internal change
PiperOrigin-RevId: 492460942
2022-12-02 07:12:08 -08:00
Randall Li
b4cddf80d7 [MDCShadow] Change deprecation warning to point at migration guide.
PiperOrigin-RevId: 490308636
2022-11-22 12:35:36 -08:00
Jeff Verkoeyen
b2bbd50350 Mark all To Be Deprecated APIs as Deprecated.
PiperOrigin-RevId: 460478209
2022-07-12 09:13:52 -07:00
Cody Weaver
c3f44a6ee5 [Shadows] Annotate "to be deprecated" symbols for MDCShadowLayer.
PiperOrigin-RevId: 457552881
2022-06-27 13:28:14 -07:00
David Collazo
6ab378ddc4 Remove deprecated enableRippleBehavior property from BottomNavigation component
PiperOrigin-RevId: 441893309
2022-04-14 17:19:57 -07:00
Wenyu Zhang
b457b13005 Internal change.
PiperOrigin-RevId: 417635153
2021-12-21 09:32:05 -08:00
Jeff Verkoeyen
86a8c97dc7 Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 400788645
2021-10-04 12:41:07 -07:00
Jeff Verkoeyen
c34de39e30 Internal change.
PiperOrigin-RevId: 397316843
2021-09-17 07:45:01 -07:00
Randall Li
502bc5d910 Ran a Swift formatter
PiperOrigin-RevId: 395947664
2021-09-10 09:48:14 -07:00
Jeff Verkoeyen
ec44b12ee9 Internal change
PiperOrigin-RevId: 394725753
2021-09-03 11:44:01 -07:00
Cody Weaver
28165af3fe Internal change
PiperOrigin-RevId: 392913717
2021-08-25 09:30:48 -07:00
Jeff Verkoeyen
b3fa42005b Optimizing imports
PiperOrigin-RevId: 356966407
2021-02-11 07:12:37 -08:00
Cody Weaver
8da92053bd [Shadows] Add example for performance testing.
PiperOrigin-RevId: 352023777
2021-01-15 09:28:16 -08:00
Jeff Verkoeyen
eb82984224 Internal change
PiperOrigin-RevId: 331764642
2020-09-15 07:31:56 -07:00
Andrew Overton
07c46757cc Replace material.io API doc links with links to the relevant header f…
This PR replaces API links containing "/api-docs/" with links to suitable header files in GitHub because the site previously linked to is being taken down and replaced with something that won't handle API docs.

Closes https://github.com/material-components/material-components-ios/pull/10045

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10045 from andrewoverton:replace-mio-api-docs-with-github-links 0d6e56cc11d0c147366a4f6cde829d8b51567ecc
PiperOrigin-RevId: 323424362
2020-07-27 13:09:23 -07:00
Wenyu Zhang
b19e4e964d [ShadowLayer] Add prepareShadowPath to MDCShadowLayer to allow its subclass preparing shadow path before MDCShadowLayer lays out its sublayers.
PiperOrigin-RevId: 313383830
2020-05-27 07:20:37 -07:00
Wenyu Zhang
a3381717f7
Fix the bazel BUILD files and snapshot that were restored unintentionally.(#9983) 2020-04-29 11:00:00 -04:00
Randall Li
0100cfe414 [MDC-iOS/BottomSheet] Fix dismissOnDraggingDownSheet behavior
The bottom sheet incorrectly allowed the sheet to be drag dismissed when `dismissOnDraggingDownSheet` was set to NO.

This change permits the gesture to dismiss to begin but prevents it from actually closing the sheet.

https://github.com/material-components/material-components-ios/issues/9723

Closes https://github.com/material-components/material-components-ios/pull/9885

PiperOrigin-RevId: 307802500
2020-04-22 06:21:26 -07:00
Jeff Verkoeyen
8abbb099a9 Delete all bazel support.
We no longer support bazel.

This PR deletes everything related to bazel support from our repo.

Closes https://github.com/material-components/material-components-ios/pull/9968

PiperOrigin-RevId: 306227127
2020-04-13 07:13:47 -07:00
featherless
162a063bda
[bazel] Remove all unused mdc_objc_library loads. (#9376)
Found by searching for all references to `\bmdc_objc_library` and removing load statements from files that only returned one result.

Clean up as part of https://github.com/material-components/material-components-ios/issues/9363
2020-01-02 14:34:36 -05:00
featherless
b7cf0de915
[bazel] Remove all unused swift_library load statements. (#9369)
Found by searching for all references to `\bswift_library` and removing load statements from files that only returned one result.

Clean up as part of https://github.com/material-components/material-components-ios/issues/5491
2020-01-02 11:01:31 -05:00
featherless
0a0bc4b47b
[automated] Ran buildifier on all BUILD files. (#9366)
```
find . -name BUILD | xargs buildifier
```

This is in preparation of https://github.com/material-components/material-components-ios/issues/9363
2020-01-02 10:05:07 -05:00
Cody Weaver
69e8021b2a
[Shadow] Make Shadow Corner Radius example more accessible. (#8962)
This updates the Shadow Corner Radius example to be more accessible by adding accessibility label and hint to the slider in this example.

Closes #8928
2019-11-15 13:39:43 -08:00
featherless
37e92a1acb
[ShadowLayer] Fix bug where headless layers would not piggyback shadowPath changes. (#8666)
Definitions:

- Headless layer: a CALayer without a delegate.
- Mounted layer: a CALayer that has been flushed to the render server either via a runloop pump or via `[CATransaction flush]`.

Context:

MDCShadowLayer includes some logic for animating shadowPath changes alongside corresponding bounds animations. The intent is that, if `shadowPath` is changed then it attempts to inherit any animation traits from existing bounds-related animations, if they exist. This behavior was added in https://github.com/material-components/material-components-ios/pull/2523. This behavior enables changes to shadowPath (which are not animatable by UIView-based animations) to inherit existing UIView-based animations.

Prior to this change, only bounds.size would be inspected for this piggy-backing behavior. While this works for UIView-based animations, which decompose `.frame` and `.bounds` animations into `bounds.size` and `bounds.origin`, this does not work for headless layers which directly animate the `bounds` property. E.g. the following snippet would piggy back as expected:

```objc
[UIView animateWithDuration:0.1 animations:^{
  someView.frame = CGRectMake(0, 0, 100, 50);
  someView.layer.shadowPath = [UIBezierPath bezierPathWithRect:someView.bounds].CGPath;
}];
```

But the following would not:

```objc
[CATransaction begin];
[CATransaction setAnimationDuration:0.5];
shadowLayer.bounds = CGRectMake(0, 0, 100, 50);
shadowLayer.shadowPath = [UIBezierPath bezierPathWithRect:shadowLayer.bounds].CGPath;
[CATransaction commit];
```

After this change, MDCShadowLayer will check for animations to `bounds` as well, increasing the likelihood that the shadowPath is able to piggy-back existing animations.

This change is part of addressing https://github.com/material-components/material-components-ios/issues/8644
2019-10-28 15:00:11 -04:00
Robert Moore
c354e6f35a [ShadowLayer] Use Starlark macros. (#8185)
Add more Starlark macro use in the BUILD file to ease transforms during
releases.

Part of #8150
2019-08-02 08:48:20 -07:00
Andrew Overton
c56d5d76d3
Add @objc annotations to get examples to show up in Dragons (#7168)
This is a follow up PR for #7166 adds @objc annotations to Swift catalogMetadata() methods, because the Swift 4 compiler no longer attempts to infer what methods should be visible to Objective-C. As a result of this change in the compiler, no Swift examples were showing up in Dragons after #7166. See this article: https://useyourloaf.com/blog/objc-warnings-upgrading-to-swift-4/ for additional context.
2019-04-17 21:35:43 -04:00
Robert Moore
7176a923ed
[ShadowLayer] Add basic Snapshot tests. (#6921)
Adding snapshot tests for elevation and shadow mask.

Closes #6806
2019-03-18 08:30:07 -04:00
Yarden Eitan
c4d24627ee
updated jazzy yaml files to include framework root (#6750)
We have had errors when generating the docs using jazzy specifically around components giving a fatal error around not finding imports when depending on other components. This is because each component for jazzy is isolated and on its own unless we provide the framework root. This caused our website generator to crash each time and fail to generate a new website.

This should resolve this problem.

QA=
Before the fix when running the website generator we got these errors:
```
/material-components-ios/components/BottomAppBar/src/MDCBottomAppBarView.h:17:9: fatal error: 'MaterialButtons.h' file not found
building site
building search index
^C/Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge/lexer.rb:458:in `load': Interrupt
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge/lexer.rb:458:in `load_lexer'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:50:in `block in <top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:49:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:49:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/jazzy_markdown.rb:2:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/jazzy_markdown.rb:2:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/doc.rb:7:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/doc.rb:7:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/config.rb:5:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/config.rb:5:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy.rb:1:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy.rb:1:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/bin/jazzy:13:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/bin/jazzy:13:in `<top (required)>'
	from /usr/local/bin/jazzy:22:in `load'
	from /usr/local/bin/jazzy:22:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in `load'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:28:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:463:in `exec'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:27:in `dispatch'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:18:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:30:in `block in <top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:22:in `<top (required)>'
	from /usr/local/bin/bundle:22:in `load'
	from /usr/local/bin/bundle:22:in `<main>'
/material-components-site-generator/scripts/lib/reporter.js:36
      throw e;
      ^

Error: Command failed: bundle exec jazzy         --output "/material-components-site-generator/.stage/ios/catalog/bottomnavigation/api-docs/"         --theme "/material-components-site-generator/ios-api-docs-src/theme"         --head '/components'         --use-safe-filenames
    at checkExecSyncError (child_process.js:601:13)
    at execSync (child_process.js:641:13)
    at JazzyApiGenerator.build (/material-components-site-generator/scripts/lib/jazzy-api-generator.js:34:5)
    at PlatformSite.generateApiDocs (/material-components-site-generator/scripts/lib/platform-site.js:212:17)
    at platformSites.forEach (/material-components-site-generator/scripts/build:86:14)
    at Array.forEach (<anonymous>)
    at reporter.step (/material-components-site-generator/scripts/build:85:21)
    at Reporter.step (/material-components-site-generator/scripts/lib/reporter.js:32:22)
    at Object.<anonymous> (/material-components-site-generator/scripts/build:84:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
```
Now we no longer get fatal errors or crash when running the script.
2019-03-01 16:52:02 -05:00
Ian Gordon
7a6a862c0a Re-enable ShapeLibrary where required 2019-02-07 16:52:45 -05:00
Ian Gordon
e61e89a592 Fix podspec validation issues 2019-02-07 16:31:09 -05:00
Yarden Eitan
de5d200599
[Shapes] Move shapes from components/private to components/ (#6495)
This is the first part of the migration of moving the Shape libraries away from the private/ folder.

Tracking bug, progress and more details can be found here: #6494 

"Because Shapes and ShapeLibrary have been used in production and are an integral part of the shape scheme and theming. Moreover, with to stop the confusion of clients that the library should not be imported as it is under private, we want to migrate the Shape libs to be under components/ instead of components/private.

The migration will be a 7 step migration to not break clients internally.

1. move the folders to the new directory.
2. Make the old component's BUILD and Podspec targets depend on the new component (and nothing else).
3. Delete all implementation files from the old component.
4. Replace the contents of the old component's headers with import statements to the new component's header. If the new component has headers that match the old component's, then the new component's headers will need to be named uniquely for a period of time to allow clients to migrate over.
5. Once all clients have migrated from the old component, delete the old component. This is a breaking change.
6. If you had to create temporary header names in the new component, then in a separate release add the new headers that you want the new component to use. Move the content of the old headers into the new headers and replace the old headers with an import of the new headers. Migrate clients to the desired headers.
7. Once all clients have moved off of the old headers, delete the old headers.

Passes bazel build and pod build locally.
2019-01-28 17:51:27 -05:00
Robert Moore
800188a649
{clang-format} Format the components. (#6347)
This is a follow-up to https://github.com/material-components/material-components-ios/pull/6027

```
find components \( -name "*.h" -or -name "*.m" \) | xargs clang-format -i
```
2019-01-23 11:08:43 -05:00
Robert Moore
07ef7f89e0
{bazel} Ran buildifier on all BUILD files (#6345)
```
find . -name BUILD | xargs buildifier
```
2019-01-16 14:16:52 -05:00
Cody Weaver
39e8848019
[ShadowLayer] Add examples to BUILD file (#6331)
Closes #6240
2019-01-16 07:45:36 -05:00
featherless
003cf8bcd9
[automated] Make mdc_unit_test_suite's name explicit. (#6080)
This change was automatically generated by running a find replace of the following strings:

```
mdc_unit_test_suite(

mdc_unit_test_suite(
    name = "unit_tests",
```

And then running buildifier to enforce style:

    find . -name BUILD | xargs ~/buildifier
2018-12-20 12:36:05 -05:00
featherless
a247edea76
Update bazel to 0.20 and all dependencies as a result (#5926)
Kokoro's Bazel version has been increased from 0.11.0 to 0.20.0

As part of this change, the `.kokoro` bazel header rewrite phase's rewrites for MDF libraries has been made less generic because MDFInternationalization can now be imported using framework-style imports as expected. MDFTextAccessibility does not yet have this functionality, so we still need to rewrite it.

Version changes in the bazel workspace:

- bazelbuild/rules_apple has been increased from 0.3.0 to 0.9.0
- bazel_skylib has been increased from 0.2.0 to 0.6.0
- bazelbuild/rules_swift has been added at 0.4.0
- xctestrunner has been increased from 0.2.1 to 0.2.5
- material_internationalization_ios has been increased from v1.0.4 to v2.0.1
- material_text_accessibility_ios has been increased from fd570d71ae0124c75ad5af00e6b8b4b1668d5e40 to v2.0.0
- motion_interchange_objc has been increased from v1.6.0 to v2.0.0
- motion_animator_objc has been increased from v2.5.0 to v3.0.0
- motion_transitioning_objc has been increased from v5.0.0 to v6.0.0
- Swift version has been pinned to 3 for all swift libraries.

buildifier was ran on all affected build targets.

This unblocks https://github.com/material-components/material-components-ios/pull/5550.
2018-12-13 14:27:43 -05:00
featherless
dae4e37ea5
[automated] Ran buildifier against all BUILD files. (#5999)
This is an automated change generated by running the following command:

    find . -name BUILD | xargs buildifier

buildifier can be installed from https://github.com/bazelbuild/buildtools

This change formats all of our BUILD files with the buildifier formatter in preparation for us having a BUILD format linter as part of our presubmits and so that we can cleanly run buildozer commands against the codebase.
2018-12-13 11:20:12 -05:00
Robert Moore
03f3351ad5
Global replace of single-precision floats with CGFloat casts. (#5718)
Replacing all non-integral, single-precision floating point literals with double-precision values explicitly cast to CGFloat.  For example, `0.1f` should become `(CGFloat)0.1`.

Regex used:
```
([0-9]*\.)([0-9]*?)([1-9]+)([0-9]*?)[fF]
```

PiperOrigin-RevId: 220683126
2018-11-12 10:50:01 -05:00
Robert Moore
74a27253e8
Global replace of integral single-precision literals with integer literals. (#5709)
Global replace of integral single-precision literals with integer literals.

Regular expression used:
```perl
/[^\w]([0-9]+)\.[0]*[fF]/$1/
```
2018-11-08 14:02:04 -05:00
Cody Weaver
a0810b5746
[ShadowLayer] Add API to animate corner radius (#5585)
### Context
A client is wanting to animate the corner radius of a view that has a `MDCShadowLayer` backing layer. This currently doesn't render correctly. The work done in #5398 still does not support animating the corner radius. #5398 additionally doesn't animate the `shadowPath` property so it still won't work properly. We set the properties in the `CATransaction completionBlock` because this prevents the layer from snapping back to it's original state after the animation completes. If a client desires to use a `CATransaction` wrapper around this animation they can do so as outlined [here](https://developer.apple.com/documentation/quartzcore/catransaction).
### The problem
Animating corner radius changes in a CAAnimation don't render
### The fix
Add an API to allow clients to animate corner radius changes for MDCShadowLayer.
### Alternatives
1. Alternatives to adding a new API would be to have the a client use our private API which isn't desirable and not future proof as discussed in #5566.

2. Add an API `- (CAGroupAnimation *)animateCornerRadius:(CGFloat)cornerRadius;` that would return all 5 of the animations and clients could set the duration and timingFunction themselves but this doesn't allow for the layers to stay animated after completion. If we want the layer to be animated after completion we could use `kCAFillModeForwards` and `removeOnCompletion = NO` but that would prevent use from animating back to the original state.
### Videos
| Before | After |
| - | - |
|![before](https://user-images.githubusercontent.com/7131294/47959028-d1fba180-dfaf-11e8-99fb-3aedd0a5010e.gif)|![after](https://user-images.githubusercontent.com/7131294/47959029-d6c05580-dfaf-11e8-97c4-68a46bbd4c7f.gif)|

| Alternative 2 | Without corner radius |
| - | - |
|![group](https://user-images.githubusercontent.com/7131294/47959034-eb9ce900-dfaf-11e8-8c92-18e668aeb21d.gif)|![nocornerradius](https://user-images.githubusercontent.com/7131294/47959036-ef307000-dfaf-11e8-83eb-dee49d2de36a.gif)|

### Bugs remaining
1. Set the MDShadowLayer cornerRadius to 0.
2. Call the new API with a duration of 5 seconds and a cornerRadius of 10.
3. Before that animation completes call the API again with a cornerRadius of 0.
#### Expected behavior
The first animation would complete and then the second animation would start.
#### Actual behavior
The animation jumps to 10 and then animates back to 0.

**_note_** This could be avoided if we added a property `BOOL` called `_isAnimating` and if that is set to `YES` then we would stash the next animation. This isn't added because most animations will be too fast for a user to tap that fast.

### Tested
cl/219964460
2018-11-05 18:25:43 -05:00
Cody Weaver
7806ee3c3e
Corner radius (#5390) (#5398)
<h3>

```diff
- Warning - This has been attempted 3 times
```
</h3>

### Context
Clients may want to set the corner radius of a UIView that they have overridden the layerClass on to use MDCShadowLayer. Currently if the shadow layer's corner radius changes those changes are not rendered (see Shadow Corner Radius example in MDCDragons). This has been attempted in [this PR](https://github.com/material-components/material-components-ios/pull/4921) and [this PR](https://github.com/material-components/material-components-ios/pull/5224) both had to be rolled back. This is a similar change to #4921 except this change does NOT mark `shadowPathIsInvalid` or call `setNeedsLayout`. This differs from #5224  in that it doesn't set the `shadowPath`'s for the sublayers or set `shadowPathIsInvalid`.

### The problem
Corner radius changes aren't rendered when using MDCShadowLayer.

### The fix
Set the corner radius on the layer and sublayers and update the mask for the sublayers.

### Additional notes
A global presubmit has been run and succeeded.
Internal CL to test: cl/216562497

### Alternatives
@andrewoverton Suggest
```objectivec
-(void)setCornerRadius:(CGFloat)cornerRadius {
  [super setCornerRadius:cornerRadius];

  [self layoutSublayers];
}
```
### Videos
| Before | After |
| - | - |
|![shadowafter](https://user-images.githubusercontent.com/7131294/46754619-e38fa900-cc90-11e8-823b-6e02d1bf666e.gif)|![shadowcorner](https://user-images.githubusercontent.com/7131294/46754945-d7581b80-cc91-11e8-8fb5-06b50f36ad69.gif)|
2018-10-11 13:33:02 -04:00
Cody Weaver
3c636c1704
[ShadowLayer] Subclass UIView in corner radius example (#5388)
### Context
In working on #4848 I noticed that the example uses an UILabel which may have a different backing layer (possibly CATextLayer) than UIView. This change makes it easier for another team member to address this issue.
### The fix
Subclass UIView which I believe is the most common use case for using a custom shadow layer in this example.
### Related issue
#4848
### Videos
| Before | After |
| - | - |
|![develop](https://user-images.githubusercontent.com/7131294/46751924-efc43800-cc89-11e8-8327-b05f6bb5f3f3.gif)|![shadowafter](https://user-images.githubusercontent.com/7131294/46751933-f357bf00-cc89-11e8-9e17-eea6dd0dd7bd.gif)|
2018-10-10 13:33:15 -04:00
featherless
cee6ae6a0f
Revert "[ShadowLayer] Add support for responding to cornerRadius changes. (#5224)" (#5231)
This reverts commit b3e2a1e283febfd90b6f5d575c18b7bf7d51408e.
2018-09-25 21:48:22 +03:00
featherless
d706762315
[ShadowLayer] Fix layout of shadow layer example. (#5222)
It now respects the top layout guide of the app bar.

| Before | After |
|--------|-------|
| ![simulator screen shot - iphone 8 plus - 2018-09-24 at 23 19 06](https://user-images.githubusercontent.com/45670/45976735-40178500-c050-11e8-9128-e581436dbb50.png) | ![simulator screen shot - iphone 8 plus - 2018-09-24 at 23 18 17](https://user-images.githubusercontent.com/45670/45976719-368e1d00-c050-11e8-8885-212dd34d9dd1.png) |
2018-09-25 16:54:20 +03:00
featherless
b3e2a1e283
[ShadowLayer] Add support for responding to cornerRadius changes. (#5224)
Prior to this change, changing the cornerRadius of a shadow layer would not propagate to the shadow paths until the next time the shadow layer's layoutSubviews was invoked.

After this change, changing the cornerRadius will immediately update the shadow paths of the shadow layer.

Closes https://github.com/material-components/material-components-ios/issues/4848

Internal CL to test: [cl/214326774](http://cl/214326774).

| Before | After |
|--|--|
|![shadowradius-broken](https://user-images.githubusercontent.com/1121006/44730113-367d1a80-aaae-11e8-9b55-024f97b797e0.gif)|![shadowradius-fixed](https://user-images.githubusercontent.com/1121006/44730119-3d0b9200-aaae-11e8-8798-98ae8100f671.gif)|
2018-09-25 15:15:12 +03:00
Randall Li
d0536a4bf9 Revert "[MDCItemBar] Fix an issue where the protocol method itemBar:shouldSelectItem: does not behave correctly (#5071)"
This reverts commit 255541a4e5009daf57113fc7fcdac7d3aac4fe08 and f4b8ed3e20de0f543e5da0d7d51d3a23a3d7b775
2018-09-21 14:15:36 -04:00
Randall Li
f4b8ed3e20 [ShadowLayer] fixed import statement for release 2018-09-19 13:43:49 -04:00
ianegordon
255541a4e5
[ShadowLayer] Mark shadowPath invalid on cornerRadius change (#4921) 2018-09-17 16:28:53 -04:00