Tengo una aplicación basada en tabbar.
Construyo 2 vistas, una en vertical y otra en modo horizontal en Interface Builder.
Ahora, quiero algo así como la aplicación iPod. Quiero que la vista de paisaje sea de pantalla completa, y ocultar la barra de pestañas y la barra de estado.
Hago funcionar el básico de esto:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration {
if (self.landscape) {
if (toInterfaceOrientation == UIInterfaceOrientationPortrait)
{
self.view = self.portrait;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(360));
}
else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft)
{
self.view = self.landscape;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90));
}
else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
self.view = self.landscape;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90));
}
else
{
self.view = self.portrait;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-180));
}
}
}
Pero todo funciona sucio. La vista del paisaje no llena correctamente el área y los controles se ubican en ubicaciones incorrectas, diferentes como diseño primero.
Además, todavía no encontré la manera de ocultar todo lo demás ...













