diff --git a/iOS/DoraemonKit/Src/Core/Plugin/UI/ViewMetrics/Function/UIView+DoraemonViewMetrics.m b/iOS/DoraemonKit/Src/Core/Plugin/UI/ViewMetrics/Function/UIView+DoraemonViewMetrics.m index 26f7c4aa0..1d34b578f 100644 --- a/iOS/DoraemonKit/Src/Core/Plugin/UI/ViewMetrics/Function/UIView+DoraemonViewMetrics.m +++ b/iOS/DoraemonKit/Src/Core/Plugin/UI/ViewMetrics/Function/UIView+DoraemonViewMetrics.m @@ -39,11 +39,14 @@ - (void)doraemon_layoutSubviews - (void)doraemonMetricsRecursiveEnable:(BOOL)enable { // 状态栏不显示元素边框 - UIWindow *statusBarWindow = [[UIApplication sharedApplication] valueForKey:@"_statusBarWindow"]; - if (statusBarWindow && [self isDescendantOfView:statusBarWindow]) { - return; + if (@available(iOS 13.0, *)) { + } else { + UIWindow *statusBarWindow = [[UIApplication sharedApplication] valueForKey:@"_statusBarWindow"]; + if (statusBarWindow && [self isDescendantOfView:statusBarWindow]) { + return; + } } - + for (UIView *subView in self.subviews) { [subView doraemonMetricsRecursiveEnable:enable]; }