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
eaaf6603
Commit
eaaf6603
authored
Jan 09, 2022
by
yuzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增一些测试代码,尝试复现某些问题
parent
f6b7b543
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
TZImagePickerController/AppDelegate.m
TZImagePickerController/AppDelegate.m
+43
-0
No files found.
TZImagePickerController/AppDelegate.m
View file @
eaaf6603
...
...
@@ -7,6 +7,7 @@
//
#import "AppDelegate.h"
#import "TZImagePickerController.h"
@interface
AppDelegate
()
...
...
@@ -16,9 +17,51 @@
-
(
BOOL
)
application
:(
UIApplication
*
)
application
didFinishLaunchingWithOptions
:(
NSDictionary
*
)
launchOptions
{
// 打开下面这句代码,使用导航栏控制器作为rootViewController
// [self useNavControllerAsRoot];
return
YES
;
}
-
(
void
)
useNavControllerAsRoot
{
UIViewController
*
vc
=
[[
UIViewController
alloc
]
init
];
vc
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
UIButton
*
btn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
20
,
200
,
300
,
44
)];
[
btn
setTitle
:
@"pushTZImagePickerController"
forState
:
UIControlStateNormal
];
[
btn
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
[
btn
addTarget
:
self
action
:
@selector
(
pushTZImagePickerController
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
vc
.
view
addSubview
:
btn
];
UINavigationController
*
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
vc
];
nav
.
navigationBar
.
barStyle
=
UIBarStyleBlack
;
nav
.
navigationBar
.
translucent
=
YES
;
nav
.
navigationBar
.
barTintColor
=
[
UIColor
colorWithRed
:(
34
/
255
.
0
)
green
:(
34
/
255
.
0
)
blue
:
(
34
/
255
.
0
)
alpha
:
1
.
0
];
nav
.
navigationBar
.
tintColor
=
[
UIColor
blackColor
];
if
(
@available
(
iOS
13
.
0
,
*
))
{
UINavigationBarAppearance
*
barAppearance
=
[[
UINavigationBarAppearance
alloc
]
init
];
if
(
nav
.
navigationBar
.
isTranslucent
)
{
UIColor
*
barTintColor
=
nav
.
navigationBar
.
barTintColor
;
barAppearance
.
backgroundColor
=
[
barTintColor
colorWithAlphaComponent
:
0
.
85
];
}
else
{
barAppearance
.
backgroundColor
=
nav
.
navigationBar
.
barTintColor
;
}
barAppearance
.
titleTextAttributes
=
nav
.
navigationBar
.
titleTextAttributes
;
nav
.
navigationBar
.
standardAppearance
=
barAppearance
;
nav
.
navigationBar
.
scrollEdgeAppearance
=
barAppearance
;
}
[
nav
setNavigationBarHidden
:
YES
];
self
.
window
.
rootViewController
=
nav
;
[
self
.
window
makeKeyAndVisible
];
}
-
(
void
)
pushTZImagePickerController
{
TZImagePickerController
*
imagePickerVc
=
[[
TZImagePickerController
alloc
]
initWithMaxImagesCount
:
9
columnNumber
:
4
delegate
:
nil
pushPhotoPickerVc
:
YES
];
imagePickerVc
.
modalPresentationStyle
=
UIModalPresentationFullScreen
;
UINavigationController
*
nav
=
(
UINavigationController
*
)[
UIApplication
sharedApplication
].
keyWindow
.
rootViewController
;
[
nav
.
topViewController
presentViewController
:
imagePickerVc
animated
:
YES
completion
:
nil
];
}
-
(
void
)
applicationWillResignActive
:(
UIApplication
*
)
application
{
}
...
...
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