[Swift]Remove border from bottom of Navigation bar

2052 단어 iOSSwiftSwift4
Memorandum

Delete border from bottom of Navigation bar.
네비게이션 바의 테두리(밑줄) 지우기

This is useful when put same color UI part below navigation bar.
 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

// Add bellow lines at didFinishLaunchingWithOptions
  UINavigationBar.appearance().setBackgroundImage(UIImage(), for: UIBarMetrics.default)
        UINavigationBar.appearance().shadowImage = UIImage()

        return true
    }

Before


After

좋은 웹페이지 즐겨찾기