Tengo una aplicación basada en tabbar.Cómo rotar vista al paisaje en una aplicación tabbar
Construyo 2 vistas, una en vertical y otra en modo horizontal en Interface Builder.
Ahora, quiero algo así como la aplicación de iPod. Quiero que la vista de paisaje sea de pantalla completa y ocultar la barra de estado & en la barra de estado.
me hacen trabajar 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 el trabajo 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é una manera de ocultar todo lo demás ...
¡Gracias por esto! – mobius