Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use keyWindow top inset to maintain backwards consistency with behavi…
…or prior to moving off of MDCDeviceTopSafeAreaInset.

PiperOrigin-RevId: 292041789
  • Loading branch information
Nobody authored and jverkoey committed Jan 29, 2020
1 parent c9eba44 commit 31c3cd7
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -17,6 +17,7 @@
#import "MDCBottomDrawerHeader.h"
#import "MDCBottomDrawerHeaderMask.h"
#import "MDCBottomDrawerShadowedView.h"
#import "MaterialApplication.h"
#import "MaterialMath.h"
#import "MaterialUIMetrics.h"

Expand Down Expand Up @@ -232,7 +233,7 @@ - (void)hideDrawer {

- (CGFloat)topSafeAreaInset {
if (@available(iOS 11.0, *)) {
return self.view.safeAreaInsets.top;
return [UIApplication mdc_safeSharedApplication].keyWindow.safeAreaInsets.top;
}
return MDCFixedStatusBarHeightOnPreiPhoneXDevices;
}
Expand Down

0 comments on commit 31c3cd7

Please sign in to comment.