uiimage增加分类,重写imagebyapplyingalpha,在需要导航栏透明的地方导入,使用self.navigationcontroller.navigationbar setbackgroundimage forbarmetrics为导航栏添加图片即可。