Files
suixinkan_uikit/suixinkan/Theme/AppNavigationBarAppearance.swift

29 lines
900 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// AppNavigationBarAppearance.swift
// suixinkan
//
import UIKit
/// UINavigationBar
enum AppNavigationBarAppearance {
/// shadow
static func applyGlobalAppearance() {
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = AppColor.cardBackground
appearance.shadowColor = .clear
appearance.titleTextAttributes = [
.foregroundColor: AppColor.textPrimary,
.font: UIFont.app(.title),
]
let navigationBar = UINavigationBar.appearance()
navigationBar.standardAppearance = appearance
navigationBar.scrollEdgeAppearance = appearance
navigationBar.compactAppearance = appearance
navigationBar.tintColor = AppColor.primary
}
}