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
e3dc771c
Commit
e3dc771c
authored
Sep 04, 2019
by
yuzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: barItemTextColor not work on iOS 13
parent
238861b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
...troller/TZImagePickerController/TZImagePickerController.h
+1
-0
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+11
-1
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
...troller/TZImagePickerController/TZPhotoPickerController.m
+4
-6
No files found.
TZImagePickerController/TZImagePickerController/TZImagePickerController.h
View file @
e3dc771c
...
@@ -304,6 +304,7 @@
...
@@ -304,6 +304,7 @@
// 获得Info.plist数据字典
// 获得Info.plist数据字典
+
(
NSDictionary
*
)
tz_getInfoDictionary
;
+
(
NSDictionary
*
)
tz_getInfoDictionary
;
+
(
BOOL
)
tz_isRightToLeftLayout
;
+
(
BOOL
)
tz_isRightToLeftLayout
;
+
(
void
)
configBarButtonItem
:(
UIBarButtonItem
*
)
item
tzImagePickerVc
:(
TZImagePickerController
*
)
tzImagePickerVc
;
@end
@end
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
e3dc771c
...
@@ -697,7 +697,9 @@
...
@@ -697,7 +697,9 @@
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
TZImagePickerController
*
imagePickerVc
=
(
TZImagePickerController
*
)
self
.
navigationController
;
TZImagePickerController
*
imagePickerVc
=
(
TZImagePickerController
*
)
self
.
navigationController
;
self
.
navigationItem
.
rightBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
imagePickerVc
.
cancelBtnTitleStr
style
:
UIBarButtonItemStylePlain
target
:
imagePickerVc
action
:
@selector
(
cancelButtonClick
)];
UIBarButtonItem
*
cancelItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
imagePickerVc
.
cancelBtnTitleStr
style
:
UIBarButtonItemStylePlain
target
:
imagePickerVc
action
:
@selector
(
cancelButtonClick
)];
[
TZCommonTools
configBarButtonItem
:
cancelItem
tzImagePickerVc
:
imagePickerVc
];
self
.
navigationItem
.
rightBarButtonItem
=
cancelItem
;
}
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
...
@@ -878,6 +880,14 @@
...
@@ -878,6 +880,14 @@
return
NO
;
return
NO
;
}
}
+
(
void
)
configBarButtonItem
:(
UIBarButtonItem
*
)
item
tzImagePickerVc
:(
TZImagePickerController
*
)
tzImagePickerVc
{
item
.
tintColor
=
tzImagePickerVc
.
barItemTextColor
;
NSMutableDictionary
*
textAttrs
=
[
NSMutableDictionary
dictionary
];
textAttrs
[
NSForegroundColorAttributeName
]
=
tzImagePickerVc
.
barItemTextColor
;
textAttrs
[
NSFontAttributeName
]
=
tzImagePickerVc
.
barItemTextFont
;
[
item
setTitleTextAttributes
:
textAttrs
forState
:
UIControlStateNormal
];
}
@end
@end
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
View file @
e3dc771c
...
@@ -82,7 +82,9 @@ static CGFloat itemMargin = 5;
...
@@ -82,7 +82,9 @@ static CGFloat itemMargin = 5;
_shouldScrollToBottom
=
YES
;
_shouldScrollToBottom
=
YES
;
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
navigationItem
.
title
=
_model
.
name
;
self
.
navigationItem
.
title
=
_model
.
name
;
self
.
navigationItem
.
rightBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
tzImagePickerVc
.
cancelBtnTitleStr
style
:
UIBarButtonItemStylePlain
target
:
tzImagePickerVc
action
:
@selector
(
cancelButtonClick
)];
UIBarButtonItem
*
cancelItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
tzImagePickerVc
.
cancelBtnTitleStr
style
:
UIBarButtonItemStylePlain
target
:
tzImagePickerVc
action
:
@selector
(
cancelButtonClick
)];
[
TZCommonTools
configBarButtonItem
:
cancelItem
tzImagePickerVc
:
tzImagePickerVc
];
self
.
navigationItem
.
rightBarButtonItem
=
cancelItem
;
if
(
tzImagePickerVc
.
navLeftBarButtonSettingBlock
)
{
if
(
tzImagePickerVc
.
navLeftBarButtonSettingBlock
)
{
UIButton
*
leftButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
UIButton
*
leftButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
leftButton
.
frame
=
CGRectMake
(
0
,
0
,
44
,
44
);
leftButton
.
frame
=
CGRectMake
(
0
,
0
,
44
,
44
);
...
@@ -91,11 +93,7 @@ static CGFloat itemMargin = 5;
...
@@ -91,11 +93,7 @@ static CGFloat itemMargin = 5;
self
.
navigationItem
.
leftBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
leftButton
];
self
.
navigationItem
.
leftBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
leftButton
];
}
else
if
(
tzImagePickerVc
.
childViewControllers
.
count
)
{
}
else
if
(
tzImagePickerVc
.
childViewControllers
.
count
)
{
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:[
NSBundle
tz_localizedStringForKey
:
@"Back"
]
style
:
UIBarButtonItemStylePlain
target
:
nil
action
:
nil
];
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:[
NSBundle
tz_localizedStringForKey
:
@"Back"
]
style
:
UIBarButtonItemStylePlain
target
:
nil
action
:
nil
];
backItem
.
tintColor
=
tzImagePickerVc
.
barItemTextColor
;
[
TZCommonTools
configBarButtonItem
:
backItem
tzImagePickerVc
:
tzImagePickerVc
];
NSMutableDictionary
*
textAttrs
=
[
NSMutableDictionary
dictionary
];
textAttrs
[
NSForegroundColorAttributeName
]
=
tzImagePickerVc
.
barItemTextColor
;
textAttrs
[
NSFontAttributeName
]
=
tzImagePickerVc
.
barItemTextFont
;
[
backItem
setTitleTextAttributes
:
textAttrs
forState
:
UIControlStateNormal
];
[
tzImagePickerVc
.
childViewControllers
firstObject
].
navigationItem
.
backBarButtonItem
=
backItem
;
[
tzImagePickerVc
.
childViewControllers
firstObject
].
navigationItem
.
backBarButtonItem
=
backItem
;
}
}
_showTakePhotoBtn
=
_model
.
isCameraRoll
&&
((
tzImagePickerVc
.
allowTakePicture
&&
tzImagePickerVc
.
allowPickingImage
)
||
(
tzImagePickerVc
.
allowTakeVideo
&&
tzImagePickerVc
.
allowPickingVideo
));
_showTakePhotoBtn
=
_model
.
isCameraRoll
&&
((
tzImagePickerVc
.
allowTakePicture
&&
tzImagePickerVc
.
allowPickingImage
)
||
(
tzImagePickerVc
.
allowTakeVideo
&&
tzImagePickerVc
.
allowPickingVideo
));
...
...
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