Pregunta

Pongo esto en loadView y funciona:

CGRect navFrame = [[UIScreen mainScreen] applicationFrame];
navFrame.size.height -= self.navigationController.navigationBar.frame.size.height;
UIImageView *imageView = [[UIImageView alloc] initWithFrame:navFrame];

Pero, ¿existe una variable como applicationFrame que da la applicationFrame menos la altura UINavigationBar?

¿Fue útil?

Solución

Parece que hay no es ya Three20 hace algo similar a lo que hice. En TTGlobalNavigatorMetrics.m, que hacen:

CGRect TTNavigationFrame() {
  CGRect frame = [UIScreen mainScreen].applicationFrame;
  return CGRectMake(0, 0, frame.size.width, frame.size.height - TTToolbarHeight());
}

http://github.com /facebook/three20/blob/master/src/Three20UINavigator/Sources/TTGlobalNavigatorMetrics.m#L53

Matt

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top