0

在此处输入图像描述有没有办法在没有这些白线的情况下进行过渡清洁?

在 rootView 我有:

   navigationController?.navigationBar.prefersLargeTitles = true

并在详细视图中:

   navigationItem.largeTitleDisplayMode = .never

在 AppDelegate 中:

let appearance = UINavigationBarAppearance()
        appearance.backgroundColor = .BlackNav
        appearance.titleTextAttributes = [.foregroundColor: UIColor.white]
        appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white]


        UINavigationBar.appearance().standardAppearance = appearance
        UINavigationBar.appearance().compactAppearance = appearance
        UINavigationBar.appearance().scrollEdgeAppearance = appearance

感谢您的回答!

编辑:

已解决:如果您不定义 UINavigationBar.appearance().compactAppearance,线条会消失:

 UINavigationBar.appearance().standardAppearance = appearance
 //UINavigationBar.appearance().compactAppearance = appearance
 UINavigationBar.appearance().scrollEdgeAppearance = appearance
4

0 回答 0