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
b8f51d02
Commit
b8f51d02
authored
Jul 15, 2017
by
谭真
Committed by
GitHub
Jul 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #501 from light-bo/master
兼容应用全局隐藏状态栏的情况
parents
0e9a5cd4
c045bb8e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
5 deletions
+22
-5
TZImagePickerController/Info.plist
TZImagePickerController/Info.plist
+2
-0
TZImagePickerController/TZImagePickerController/TZGifPhotoPreviewController.m
...ler/TZImagePickerController/TZGifPhotoPreviewController.m
+4
-1
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
...troller/TZImagePickerController/TZImagePickerController.h
+2
-0
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+1
-0
TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m
...roller/TZImagePickerController/TZPhotoPreviewController.m
+6
-2
TZImagePickerController/TZImagePickerController/TZVideoPlayerController.m
...troller/TZImagePickerController/TZVideoPlayerController.m
+7
-2
No files found.
TZImagePickerController/Info.plist
View file @
b8f51d02
...
@@ -36,6 +36,8 @@
...
@@ -36,6 +36,8 @@
<array>
<array>
<string>
armv7
</string>
<string>
armv7
</string>
</array>
</array>
<key>
UIStatusBarHidden
</key>
<true/>
<key>
UISupportedInterfaceOrientations
</key>
<key>
UISupportedInterfaceOrientations
</key>
<array>
<array>
<string>
UIInterfaceOrientationPortrait
</string>
<string>
UIInterfaceOrientationPortrait
</string>
...
...
TZImagePickerController/TZImagePickerController/TZGifPhotoPreviewController.m
View file @
b8f51d02
...
@@ -98,7 +98,10 @@
...
@@ -98,7 +98,10 @@
-
(
void
)
signleTapAction
{
-
(
void
)
signleTapAction
{
_toolBar
.
hidden
=
!
_toolBar
.
isHidden
;
_toolBar
.
hidden
=
!
_toolBar
.
isHidden
;
[
self
.
navigationController
setNavigationBarHidden
:
_toolBar
.
isHidden
];
[
self
.
navigationController
setNavigationBarHidden
:
_toolBar
.
isHidden
];
if
(
!
TZ_isGlobalHideStatusBar
)
{
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
_toolBar
.
isHidden
;
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
_toolBar
.
isHidden
;
}
}
}
-
(
void
)
doneButtonClick
{
-
(
void
)
doneButtonClick
{
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
View file @
b8f51d02
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#define iOS9Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.0f)
#define iOS9Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.0f)
#define iOS9_1Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.1f)
#define iOS9_1Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.1f)
#define TZ_isGlobalHideStatusBar [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIStatusBarHidden"] boolValue]
@protocol
TZImagePickerControllerDelegate
;
@protocol
TZImagePickerControllerDelegate
;
@interface
TZImagePickerController
:
UINavigationController
@interface
TZImagePickerController
:
UINavigationController
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
b8f51d02
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
self
.
navigationBar
.
translucent
=
YES
;
self
.
navigationBar
.
translucent
=
YES
;
[
TZImageManager
manager
].
shouldFixOrientation
=
NO
;
[
TZImageManager
manager
].
shouldFixOrientation
=
NO
;
// Default appearance, you can reset these after this method
// Default appearance, you can reset these after this method
// 默认的外观,你可以在这个方法后重置
// 默认的外观,你可以在这个方法后重置
self
.
oKButtonTitleColorNormal
=
[
UIColor
colorWithRed
:(
83
/
255
.
0
)
green
:(
179
/
255
.
0
)
blue
:
(
17
/
255
.
0
)
alpha
:
1
.
0
];
self
.
oKButtonTitleColorNormal
=
[
UIColor
colorWithRed
:(
83
/
255
.
0
)
green
:(
179
/
255
.
0
)
blue
:
(
17
/
255
.
0
)
alpha
:
1
.
0
];
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m
View file @
b8f51d02
...
@@ -65,7 +65,9 @@
...
@@ -65,7 +65,9 @@
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
animated
:
YES
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
animated
:
YES
];
if
(
!
TZ_isGlobalHideStatusBar
)
{
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
YES
;
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
YES
;
}
if
(
_currentIndex
)
[
_collectionView
setContentOffset
:
CGPointMake
((
self
.
view
.
tz_width
+
20
)
*
_currentIndex
,
0
)
animated
:
NO
];
if
(
_currentIndex
)
[
_collectionView
setContentOffset
:
CGPointMake
((
self
.
view
.
tz_width
+
20
)
*
_currentIndex
,
0
)
animated
:
NO
];
[
self
refreshNaviBarAndBottomBarState
];
[
self
refreshNaviBarAndBottomBarState
];
}
}
...
@@ -73,7 +75,9 @@
...
@@ -73,7 +75,9 @@
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
{
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
[
super
viewWillDisappear
:
animated
];
[
self
.
navigationController
setNavigationBarHidden
:
NO
animated
:
YES
];
[
self
.
navigationController
setNavigationBarHidden
:
NO
animated
:
YES
];
if
(
!
TZ_isGlobalHideStatusBar
)
{
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
NO
;
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
NO
;
}
[
TZImageManager
manager
].
shouldFixOrientation
=
NO
;
[
TZImageManager
manager
].
shouldFixOrientation
=
NO
;
}
}
...
...
TZImagePickerController/TZImagePickerController/TZVideoPlayerController.m
View file @
b8f51d02
...
@@ -125,7 +125,9 @@
...
@@ -125,7 +125,9 @@
[
self
.
navigationController
setNavigationBarHidden
:
YES
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
];
_toolBar
.
hidden
=
YES
;
_toolBar
.
hidden
=
YES
;
[
_playButton
setImage
:
nil
forState
:
UIControlStateNormal
];
[
_playButton
setImage
:
nil
forState
:
UIControlStateNormal
];
if
(
!
TZ_isGlobalHideStatusBar
)
{
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
YES
;
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
YES
;
}
}
else
{
}
else
{
[
self
pausePlayerAndShowNaviBar
];
[
self
pausePlayerAndShowNaviBar
];
}
}
...
@@ -163,7 +165,10 @@
...
@@ -163,7 +165,10 @@
_toolBar
.
hidden
=
NO
;
_toolBar
.
hidden
=
NO
;
[
self
.
navigationController
setNavigationBarHidden
:
NO
];
[
self
.
navigationController
setNavigationBarHidden
:
NO
];
[
_playButton
setImage
:[
UIImage
imageNamedFromMyBundle
:
@"MMVideoPreviewPlay.png"
]
forState
:
UIControlStateNormal
];
[
_playButton
setImage
:[
UIImage
imageNamedFromMyBundle
:
@"MMVideoPreviewPlay.png"
]
forState
:
UIControlStateNormal
];
if
(
!
TZ_isGlobalHideStatusBar
)
{
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
NO
;
if
(
iOS7Later
)
[
UIApplication
sharedApplication
].
statusBarHidden
=
NO
;
}
}
}
-
(
void
)
dealloc
{
-
(
void
)
dealloc
{
...
...
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