Skip to content

Commit 5735a11

Browse files
authored
Merge pull request #543 from woxtu/user-interface-idiom
Use the recommended way to detect the current user device
2 parents 1de3617 + 082f660 commit 5735a11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objective-C/TOCropViewController/TOCropViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ - (CGFloat)statusBarHeight
12901290
// We do need to include the status bar height on devices
12911291
// that have a physical hardware inset, like an iPhone X notch
12921292
BOOL hardwareRelatedInset = self.view.safeAreaInsets.bottom > FLT_EPSILON
1293-
&& UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone;
1293+
&& UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone;
12941294

12951295
// Always have insetting on Mac Catalyst
12961296
#if TARGET_OS_MACCATALYST

0 commit comments

Comments
 (0)