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,
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.
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:
check sample project , find out missing.
hope help.
Comments
Post a Comment