I need to set a background image for the columns of the UINavigationControllerentire application, so I wrote the following code:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
let backgroundImage = UIImage(named: "NavBar")
UINavigationBar.appearance().setBackgroundImage(backgroundImage, forBarMetrics: .Default)
return true
}
However, I need to UIImagefit the size of the bar, because in my case it is too big and not suitable for the whole bar. How can i do this?
Thanks in advance.
source
share