diff --git a/Ifish/Utinitys/IfishUtils/UINavigationBar+Background.m b/Ifish/Utinitys/IfishUtils/UINavigationBar+Background.m index bb1848d..e968ad8 100755 --- a/Ifish/Utinitys/IfishUtils/UINavigationBar+Background.m +++ b/Ifish/Utinitys/IfishUtils/UINavigationBar+Background.m @@ -26,6 +26,11 @@ static char overlayKey; if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + 20)]; + if (@available(iOS 11.0, *)) { + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -44, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + 44)]; + } else { + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + 20)]; + } self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; [self insertSubview:self.overlay atIndex:0];