objective c - Transparent UINavigationBar in UITableViewController in iOS 8 -


i have view controllers set navigation bar transparent this:

viewcontroller.navigationcontroller.navigationbar.translucent = yes; viewcontroller.edgesforextendedlayout = uirectedgenone; [viewcontroller.navigationcontroller.navigationbar setbackgroundimage:[uiimage new] forbarmetrics:uibarmetricsdefault]; 

for uiviewcontroller works fine , able this:

enter image description here

however, when using uitableviewcontroller doesn't quite work , this:

enter image description here

it't grey background in navigation bar can't rid of. experiencing issue in ios 8.3. have tested in ios 7.1 , there works fine.

edit:

i have tried setting following without success:

tableviewcontroller.navigationcontroller.navigationbar.shadowimage = [uiimage new]; tableviewcontroller.navigationcontroller.navigationbar.backgroundcolor = [uicolor clearcolor]; tableviewcontroller.tableview.backgroundcolor = [uicolor clearcolor]; 

there 2 ways it:

1 . can override navigation controller class , in viewdidload method of view controllor specify code change color of uinavigationbar .


self.navigationbar.barstyle = uibarstyle.blue //   can give color of choice self.navigationbar.tintcolor = uicolor.whitecolor() // or uicolor clearcolor 

2.if want universally or want apply same color of navigation bar throughout app use below code in appdelegate's :didfinishlaunchingwithoptions method:


uinavigationbar.appearance() .bartintcolor = uicolor(red: 100.0/255.0, green: 226.0/255.0, blue: 98.0/255.0, alpha: 1.0)  // can give color of choice uinavigationbar.appearance().tintcolor = uicolor.whitecolor() // or uicolor clearcolor uinavigationbar.appearance().titletextattributes = [nsforegroundcolorattributename : uicolor.whitecolor()]  

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -