Using Background Image in Navigation Bar in ios in XCode

You can still use the setBackgroundImage: method to assign a custom image for the navigation bar. Here is the line of code for setting the background image. Insert it inside AppDelegate didFinishLaunchingWithoptions... method: 

UINavigationBar.appearance().setBackgroundImage(UIImage(named: "nav_bg.png"), forBarMetrics: UIBarMetrics.Default)

0 nhận xét:

Đăng nhận xét