Ram Mani Ram Mani - 4 months ago 10
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

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

override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)
    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.