Set Image Underlay of Transparent Navigation Bar and Status Bar in Swift iOS 8 -


i new in ios swift development , facing problem. want set transparent navigation bar , make image underlay of transparent navigation bar , status bar image below,

enter image description here

but after implemented following code,

self.navigationcontroller!.navigationbar.setbackgroundimage(uiimage(), forbarmetrics: .default) self.navigationcontroller!.navigationbar.shadowimage = uiimage() self.navigationcontroller!.navigationbar.translucent = true 

the result image still below navigation bar , status bar though set navigation bar transparent.

enter image description here

i have tried same code provided:

override func viewdidload() {     super.viewdidload()     self.navigationcontroller!.navigationbar.setbackgroundimage(uiimage(), forbarmetrics: .default)     self.navigationcontroller!.navigationbar.shadowimage = uiimage()     self.navigationcontroller!.navigationbar.translucent = true } 

and working fine , can see result here:

enter image description here

check sample project , find out missing.

hope help.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -