Skip to content

Commit

Permalink
Use the recommended way to detect the current user device
Browse files Browse the repository at this point in the history
  • Loading branch information
woxtu committed Nov 18, 2022
1 parent a942414 commit 082f660
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Objective-C/TOCropViewController/TOCropViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ - (CGFloat)statusBarHeight
// We do need to include the status bar height on devices
// that have a physical hardware inset, like an iPhone X notch
BOOL hardwareRelatedInset = self.view.safeAreaInsets.bottom > FLT_EPSILON
&& UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone;
&& UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone;

// Always have insetting on Mac Catalyst
#if TARGET_OS_MACCATALYST
Expand Down

0 comments on commit 082f660

Please sign in to comment.