Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
I
IFS-iOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
IFS-iOS
Commits
514fb312
Commit
514fb312
authored
Jan 14, 2023
by
jzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
navigationbar适配iOS15
parent
731dd92d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
BaseNavigationController.swift
IFS/IFS/Expand/Base/BaseNavigationController.swift
+17
-0
No files found.
IFS/IFS/Expand/Base/BaseNavigationController.swift
View file @
514fb312
...
...
@@ -12,6 +12,23 @@ class BaseNavigationController: UINavigationController {
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
let
titleTextAttributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
NSAttributedString
.
Key
.
font
:
UIFont
.
boldSystemFont
(
ofSize
:
22
),
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
.
white
]
navigationBar
.
isTranslucent
=
false
navigationBar
.
titleTextAttributes
=
titleTextAttributes
navigationBar
.
barTintColor
=
kMainColor
navigationBar
.
tintColor
=
UIColor
.
white
if
#available(iOS 13.0, *)
{
let
appearance
=
UINavigationBarAppearance
()
// 设置导航栏背景色
appearance
.
backgroundColor
=
kMainColor
// 字体颜色、尺寸等
appearance
.
titleTextAttributes
=
titleTextAttributes
// 带scroll滑动的页面
navigationBar
.
scrollEdgeAppearance
=
appearance
// 常规页面
navigationBar
.
standardAppearance
=
appearance
}
}
...
...
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