¿Cómo consigo la fuente barra de herramientas para que coincida con UINavigationController?
-
12-09-2019 - |
Pregunta
el siguiente post , yo era capaz de añadir un UILabel a un UIToolbar, sin embargo, se ve horrible. Alguien sabe cómo conseguir el tamaño del texto / color / sombra para que coincida con el título de UINavigationController?
Navigation Controller
http://www.codingwithoutcomments.com/uploads/Picture1.png
UIToolbar con UILabel
http://www.codingwithoutcomments.com/uploads/Picture2.png
¿Qué pasos debo seguir para hacer que coincidan?
Solución
También puede ser que desee añadir una sombra?
itemLabel.shadowColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
itemLabel.shadowOffset = CGSizeMake(0, -1.0);
Otros consejos
Obviamente, la pregunta es sobre el iPhone, pero en caso de que alguien se lo pregunta, aquí están los números para el iPad:
titleLabel.font = [UIFont boldSystemFontOfSize:20.0];
titleLabel.shadowOffset = CGSizeMake(0, 1);
titleLabel.shadowColor = [UIColor colorWithWhite:1.f alpha:.5f];
titleLabel.textColor = [UIColor colorWithRed:113.f/255.f green:120.f/255.f blue:127.f/255.f alpha:1.f];
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.text = @"Title";
UILabel * itemLabel = [[UILabel alloc] initWithFrame:rectArea];
itemLabel.text = @"Item";
itemLabel.textColor = [UIColor whiteColor];
itemLabel.font = [UIFont boldSystemFontOfSize:22.0];
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow