如图:
UINavigationController *navigationController = [[UINavigationControlleralloc] initWithRootViewController:[[ViewControlleralloc] initWithNibName:@"ViewController"bundle:nil]];
//以下是关键
// navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
navigationController.navigationBar.translucent =YES;