self.nav = [[[NavViewController alloc] initWithRootViewController:self.viewController] autorelease];
[self.nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"navbg"] forBarMetrics:UIBarMetricsDefault];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],UITextAttributeTextColor,[UIColor blackColor],UITextAttributeTextShadowColor,[UIFont boldSystemFontOfSize:20.0],UITextAttributeFont,CGSizeMake(0, -1.0),UITextAttributeTextShadowOffset,
nil];
self.nav.navigationBar.titleTextAttributes = dict;
那个statusbar字体是黑色的,我怎么设置成白色的?
在viewDidLoad里面加 [self setNeedsStatusBarAppearanceUpdate];
再重写- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}不过iOS7以下不能用