Skip to content

Commit

Permalink
[List] Use isKindOfClass to ensure there is support for all MDCShadow…
Browse files Browse the repository at this point in the history
…Layer's subclasses.

PiperOrigin-RevId: 353292179
  • Loading branch information
yarneo authored and material-automation committed Jan 22, 2021
1 parent 3f7cc9f commit d5bba14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/List/src/MDCBaseCell.m
Expand Up @@ -15,8 +15,10 @@
#import "MDCBaseCell.h"
#import "MDCSelfSizingLayoutAttributes.h"

#import "MaterialElevation.h"
#import "MaterialInk.h"
#import "MaterialRipple.h"
#import "MaterialShadowElevations.h"
#import "MaterialShadowLayer.h"

@interface MDCBaseCell ()
Expand Down Expand Up @@ -208,7 +210,7 @@ - (UIColor *)rippleColor {
}

- (MDCShadowLayer *)shadowLayer {
if ([self.layer isMemberOfClass:[MDCShadowLayer class]]) {
if ([self.layer isKindOfClass:[MDCShadowLayer class]]) {
return (MDCShadowLayer *)self.layer;
}
return nil;
Expand Down

0 comments on commit d5bba14

Please sign in to comment.