Skip to content

Commit

Permalink
Merge pull request #543 from woxtu/user-interface-idiom
Browse files Browse the repository at this point in the history
Use the recommended way to detect the current user device
  • Loading branch information
TimOliver authored Apr 6, 2024
2 parents 1de3617 + 082f660 commit 5735a11
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 @@ -1290,7 +1290,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 5735a11

Please sign in to comment.