iOS: hasNotch implements
This commit is contained in:
@@ -95,3 +95,12 @@ void ShowToast(NSString *text, DoricGravity gravity) {
|
||||
UIGraphicsEndImageContext();
|
||||
return image;
|
||||
}
|
||||
|
||||
BOOL hasNotch() {
|
||||
if (@available(iOS 11.0, *)) {
|
||||
CGFloat height = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom;
|
||||
return (height > 0);
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user