Frage

Ich habe dies in Loadview und es funktioniert:

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

Aber gibt es eine Variable wie Applicationframe, der die Application minus der UINavigationBar Höhe gibt?

War es hilfreich?

Lösung

Sieht aus wie es ist nicht da three20 tut etwas Ähnliches, was ich tat. In TTGlobalNavigatorMetrics.m, sie tun:

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top