La @ La respuesta de RyJ es genial y funcionó para mí. Pensé que había CHIP en que hay un buen tutorial sobre esto en el sitio de Ray Wenderlich, titulado (el interior):
User Interface Customization in iOS 6
Vea la sección Personalización UINavigationBar
He aquí el fragmento de código de el título de la barra de navegación, para cambiar a nivel mundial:
// Customize the title text for *all* UINavigationBars
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0],
UITextAttributeTextColor,
[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8],
UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0, -1)],
UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Arial-Bold" size:0.0],
UITextAttributeFont,
nil]];
otro punto menor es que parece que hay una sombra por defecto en la barra de título, por lo que deshacerse de él, no puedes simplemente eliminar el atributo. En su lugar, debe establecer un desplazamiento sombreado:
UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake(0, 0)]
Debe aceptar su propia respuesta. –
muy útil .. gracias –
Funciona bien. Si es necesario configurar también el tema de la UINavigationBar activo, añada esta línea: '[yourViewController.navigationController.navigationBar setTitleTextAttributes: textTitleOptions]' –