Skip to content

Commit

Permalink
[Material][Availability] Migrates Buttons to MDCAvailability.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 293865037
  • Loading branch information
Nobody authored and Jeff Verkoeyen committed Feb 7, 2020
1 parent 081fd7a commit 421770c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
#import <CoreGraphics/CoreGraphics.h>
#import <UIKit/UIKit.h>

#include "MDCAvailability.h"
#import "MaterialButtons.h"
#import "MaterialColor.h"
#import "MaterialTypography.h"
#import "MaterialColor.h"

/** A @c MDCButton test fake to override the @c traitCollection to test for dynamic type. */
@interface ButtonDynamicTypeSnapshotTestFakeButton : MDCButton
Expand Down Expand Up @@ -250,7 +251,7 @@ - (void)testContentSizeCategoryAccessibilityExtraExtraExtraLarge {
}

- (void)testButtonRespondsToDynamicColor {
#if defined(__IPHONE_13_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0)
#if MDC_AVAILABLE_SDK_IOS(13_0)
if (@available(iOS 13.0, *)) {
// Given
UIColor *shadowColor = [UIColor colorWithUserInterfaceStyleDarkColor:UIColor.magentaColor
Expand All @@ -276,7 +277,7 @@ - (void)testButtonRespondsToDynamicColor {
[self.button mdc_addToBackgroundViewWithInsets:UIEdgeInsetsMake(50, 50, 50, 50)];
[self snapshotVerifyViewForIOS13:snapshotView];
}
#endif
#endif // MDC_AVAILABLE_SDK_IOS(13_0)
}

@end

0 comments on commit 421770c

Please sign in to comment.