0
我想讓它變成半透明的黑色,爲什麼這不起作用?UINavigationBar風格不變
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UINavigationController *viewController1 = [[UINavigationController alloc] init];
viewController1.navigationBar.barStyle = UIBarStyleBlackTranslucent;
RSSViewController *rssViewController = [[RSSViewController alloc] init];
[viewController1 addChildViewController:rssViewController];
UIViewController *viewController2 = [[CalendarViewController alloc] initWithNibName:@"CalendarViewController" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = @[viewController1, viewController2];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
[self customizeInterface];
return YES;
}
當我把viewController1.navigationBar.barStyle = UIBarStyleBlackTranslucent;導航項目簡單地消失......
不能正常使用,欄按鈕不會再顯示出來 – 1337code