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
bc9d93ea
Unverified
Commit
bc9d93ea
authored
Sep 16, 2019
by
谭真
Committed by
GitHub
Sep 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1161 from RayJiang16/master
修复 iOS 13 新的 present 效果导致 UI 错误的问题
parents
aa519070
836e6dc2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+15
-1
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
...troller/TZImagePickerController/TZPhotoPickerController.m
+2
-1
TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m
...roller/TZImagePickerController/TZPhotoPreviewController.m
+3
-2
TZImagePickerController/TZImagePickerController/TZVideoPlayerController.m
...troller/TZImagePickerController/TZVideoPlayerController.m
+2
-1
No files found.
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
bc9d93ea
...
...
@@ -21,6 +21,7 @@
UIButton
*
_settingBtn
;
BOOL
_pushPhotoPickerVc
;
BOOL
_didPushPhotoPickerVc
;
CGRect
_cropRect
;
UIButton
*
_progressHUD
;
UIView
*
_HUDContainer
;
...
...
@@ -493,6 +494,18 @@
_cropRectLandscape
=
CGRectMake
((
self
.
view
.
tz_height
-
widthHeight
)
/
2
,
cropRect
.
origin
.
x
,
widthHeight
,
widthHeight
);
}
-
(
CGRect
)
cropRect
{
CGFloat
screenHeight
=
[
UIScreen
mainScreen
].
bounds
.
size
.
height
;
BOOL
isFullScreen
=
self
.
view
.
tz_height
==
screenHeight
;
if
(
isFullScreen
)
{
return
_cropRect
;
}
else
{
CGRect
newCropRect
=
_cropRect
;
newCropRect
.
origin
.
y
-=
((
screenHeight
-
self
.
view
.
tz_height
)
/
2
);
return
newCropRect
;
}
}
-
(
void
)
setTimeout
:(
NSInteger
)
timeout
{
_timeout
=
timeout
;
if
(
timeout
<
5
)
{
...
...
@@ -782,9 +795,10 @@
CGFloat
tableViewHeight
=
0
;
CGFloat
naviBarHeight
=
self
.
navigationController
.
navigationBar
.
tz_height
;
BOOL
isStatusBarHidden
=
[
UIApplication
sharedApplication
].
isStatusBarHidden
;
BOOL
isFullScreen
=
self
.
view
.
tz_height
==
[
UIScreen
mainScreen
].
bounds
.
size
.
height
;
if
(
self
.
navigationController
.
navigationBar
.
isTranslucent
)
{
top
=
naviBarHeight
;
if
(
!
isStatusBarHidden
)
top
+=
[
TZCommonTools
tz_statusBarHeight
];
if
(
!
isStatusBarHidden
&&
isFullScreen
)
top
+=
[
TZCommonTools
tz_statusBarHeight
];
tableViewHeight
=
self
.
view
.
tz_height
-
top
;
}
else
{
tableViewHeight
=
self
.
view
.
tz_height
;
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
View file @
bc9d93ea
...
...
@@ -303,10 +303,11 @@ static CGFloat itemMargin = 5;
CGFloat
collectionViewHeight
=
0
;
CGFloat
naviBarHeight
=
self
.
navigationController
.
navigationBar
.
tz_height
;
BOOL
isStatusBarHidden
=
[
UIApplication
sharedApplication
].
isStatusBarHidden
;
BOOL
isFullScreen
=
self
.
view
.
tz_height
==
[
UIScreen
mainScreen
].
bounds
.
size
.
height
;
CGFloat
toolBarHeight
=
[
TZCommonTools
tz_isIPhoneX
]
?
50
+
(
83
-
49
)
:
50
;
if
(
self
.
navigationController
.
navigationBar
.
isTranslucent
)
{
top
=
naviBarHeight
;
if
(
!
isStatusBarHidden
)
top
+=
[
TZCommonTools
tz_statusBarHeight
];
if
(
!
isStatusBarHidden
&&
isFullScreen
)
top
+=
[
TZCommonTools
tz_statusBarHeight
];
collectionViewHeight
=
tzImagePickerVc
.
showSelectBtn
?
self
.
view
.
tz_height
-
toolBarHeight
-
top
:
self
.
view
.
tz_height
-
top
;;
}
else
{
collectionViewHeight
=
tzImagePickerVc
.
showSelectBtn
?
self
.
view
.
tz_height
-
toolBarHeight
:
self
.
view
.
tz_height
;
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m
View file @
bc9d93ea
...
...
@@ -247,8 +247,9 @@
[
super
viewDidLayoutSubviews
];
TZImagePickerController
*
_tzImagePickerVc
=
(
TZImagePickerController
*
)
self
.
navigationController
;
CGFloat
statusBarHeight
=
[
TZCommonTools
tz_statusBarHeight
];
CGFloat
statusBarHeightInterval
=
statusBarHeight
-
20
;
BOOL
isFullScreen
=
self
.
view
.
tz_height
==
[
UIScreen
mainScreen
].
bounds
.
size
.
height
;
CGFloat
statusBarHeight
=
isFullScreen
?
[
TZCommonTools
tz_statusBarHeight
]
:
0
;
CGFloat
statusBarHeightInterval
=
isFullScreen
?
(
statusBarHeight
-
20
)
:
0
;
CGFloat
naviBarHeight
=
statusBarHeight
+
_tzImagePickerVc
.
navigationBar
.
tz_height
;
_naviBar
.
frame
=
CGRectMake
(
0
,
0
,
self
.
view
.
tz_width
,
naviBarHeight
);
_backButton
.
frame
=
CGRectMake
(
10
,
10
+
statusBarHeightInterval
,
44
,
44
);
...
...
TZImagePickerController/TZImagePickerController/TZVideoPlayerController.m
View file @
bc9d93ea
...
...
@@ -140,7 +140,8 @@
-
(
void
)
viewDidLayoutSubviews
{
[
super
viewDidLayoutSubviews
];
CGFloat
statusBarHeight
=
[
TZCommonTools
tz_statusBarHeight
];
BOOL
isFullScreen
=
self
.
view
.
tz_height
==
[
UIScreen
mainScreen
].
bounds
.
size
.
height
;
CGFloat
statusBarHeight
=
isFullScreen
?
[
TZCommonTools
tz_statusBarHeight
]
:
0
;
CGFloat
statusBarAndNaviBarHeight
=
statusBarHeight
+
self
.
navigationController
.
navigationBar
.
tz_height
;
_playerLayer
.
frame
=
self
.
view
.
bounds
;
CGFloat
toolBarHeight
=
[
TZCommonTools
tz_isIPhoneX
]
?
44
+
(
83
-
49
)
:
44
;
...
...
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