通过以下代码实现:
/*开启半透明效果*/
self.navigationController.navigationBar.translucent = YES;
/*创建一张透明图片*/
UIImage *clearImage = [UIImage new];
[self.navigationController.navigationBar setBackgroundImage:clearImage forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:clearImage];