Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
dz_TZImagePickerController
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shuijing
dz_TZImagePickerController
Commits
c4cb76b1
Commit
c4cb76b1
authored
Sep 13, 2018
by
yuzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XS XR的deviceModel还未知,改为用尺寸来判断是否是iPhoneX
parent
ca025a2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+4
-12
No files found.
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
c4cb76b1
...
...
@@ -14,7 +14,6 @@
#import "TZAssetCell.h"
#import "UIView+Layout.h"
#import "TZImageManager.h"
#import <sys/utsname.h>
@interface
TZImagePickerController
()
{
NSTimer
*
_timer
;
...
...
@@ -833,17 +832,10 @@
@implementation
TZCommonTools
+
(
BOOL
)
tz_isIPhoneX
{
struct
utsname
systemInfo
;
uname
(
&
systemInfo
);
NSString
*
platform
=
[
NSString
stringWithCString
:
systemInfo
.
machine
encoding
:
NSASCIIStringEncoding
];
if
([
platform
isEqualToString
:
@"i386"
]
||
[
platform
isEqualToString
:
@"x86_64"
])
{
// 模拟器下采用屏幕的高度来判断
return
(
CGSizeEqualToSize
([
UIScreen
mainScreen
].
bounds
.
size
,
CGSizeMake
(
375
,
812
))
||
CGSizeEqualToSize
([
UIScreen
mainScreen
].
bounds
.
size
,
CGSizeMake
(
812
,
375
)));
}
// iPhone10,6是美版iPhoneX 感谢hegelsu指出:https://github.com/banchichen/TZImagePickerController/issues/635
BOOL
isIPhoneX
=
[
platform
isEqualToString
:
@"iPhone10,3"
]
||
[
platform
isEqualToString
:
@"iPhone10,6"
];
return
isIPhoneX
;
return
(
CGSizeEqualToSize
([
UIScreen
mainScreen
].
bounds
.
size
,
CGSizeMake
(
375
,
812
))
||
CGSizeEqualToSize
([
UIScreen
mainScreen
].
bounds
.
size
,
CGSizeMake
(
812
,
375
))
||
CGSizeEqualToSize
([
UIScreen
mainScreen
].
bounds
.
size
,
CGSizeMake
(
414
,
896
))
||
CGSizeEqualToSize
([
UIScreen
mainScreen
].
bounds
.
size
,
CGSizeMake
(
896
,
414
)));
}
+
(
CGFloat
)
tz_statusBarHeight
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment