1
1

More than 1 year has passed since last update.

[Swift]NavigationBarの下線の消し方(iOS13以降)

Posted at
extension.swift
extension UINavigationBar {
    @available(iOS 13.0, *)
    private func applyAppearance() {
        let appearance = UINavigationBarAppearance()
        appearance.configureWithDefaultBackground()
        appearance.shadowImage = UIImage()
        appearance.shadowColor = .clear
        appearance.backgroundImage = UIImage()
        appearance.backgroundColor = .white

        standardAppearance = appearance
        scrollEdgeAppearance = appearance
    }
}

これで消せます。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1