Ram Mani Ram Mani - 1 year ago 69
Swift Question

How set the image on the top of UISpliteViewcontroller

i want to set image as Please help me
enter image description here

Answer Source

What you want is setting an image for UINavigationBar. For this, you need this code :

override func viewWillAppear(animated: Bool) {
    UINavigationBar.appearance().setBackgroundImage(UIImage(named: "imageBackground")!.resizableImageWithCapInsets(UIEdgeInsetsMake(0, 0, 0, 0), resizingMode: .Stretch), forBarMetrics: .Default)

It will set your image called imageBackground as the background for your UINavigationBar.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download