Есть ли способ сделать UINavigationBar
, предназначенный для iOS 7, сплошным цветом без прозрачности? Я попытался установить backgroundColor, barTintColor, непрозрачный, прозрачный/полупрозрачный и т.д.... и ничего не работает.
Кто-нибудь знает, как это сделать?
Вот несколько фрагментов кода, который я использовал. Обратите внимание на свойства, которые я установил на navigationBar
. Ни один из них в любом порядке или комбинации не работал.
@property (strong, nonatomic) UITabBarController *tabBarController;
testViewController = [[TestViewController alloc] init];
anotherViewController = [[AnotherViewController alloc] init];
navigationController = [[UINavigationController alloc]
initWithRootViewController:testViewController];
navigationController.navigationBar.barTintColor = [UIColor darkGrayColor;
navigationController.navigationBar.barStyle = UIBarStyleBlack;
navigationController.navigationBar.translucent = YES;
navigationController.navigationBar.opaque = YES;
NSArray *tabBarViewControllers = [NSArray arrayWithObjects:
navigationController,
anotherViewController, nil];
self.tabBarController.viewControllers = tabBarViewControllers;