Czy jest jakiś sposób, aby UINavigationBar
, ukierunkowany na iOS 7, był jednolitym kolorem bez przezroczystości? Próbowałem ustawić backgroundColor, barTintColor, opaque, transparent/translucent, etc ... i nic nie działa.Jak uzyskać nieprzejrzysty pasek UINavigationBar na iOS 7
Ktoś wie, jak to zrobić?
Oto niektóre fragmenty kodu, z których korzystałem. Zwróć uwagę na właściwości, które ustawiłem na navigationBar
. Żaden z nich, w dowolnej kolejności lub kombinacji, nie zadziałał.
@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;
postu kod jak ustawiasz przezroczyste. – null
sprawdź edytuj proszę. dzięki. – tentmaking
Spróbuj umieścić 'self.navigationController.navigationBar.translucent = NO;' w swoim 'testViewController'. – null