rotar rotacion quiero que porque plus pantalla gire girar gira desactivar iphone game-center uiinterfaceorientation ios6

rotacion - rotar pantalla iphone 6



Bloqueo de inicio de sesiĆ³n del centro de juego solo en horizontal en i OS 6 (2)

Finalmente, evité el bloqueo siguiendo la solución alternativa mencionada en las notas de lanzamiento de iOS 6 de Apple.

Solución:

1.Apps should provide the delegate method application:supportedIntefaceOrientationsForWindow and ensure that portrait is one of the returned mask values. 1.Apps should provide the delegate method application:supportedIntefaceOrientationsForWindow and ensure that portrait is one of the returned mask values. 1.Apps should provide the delegate method application:supportedIntefaceOrientationsForWindow and ensure that portrait is one of the returned mask values.

- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window { return UIInterfaceOrientationMaskAllButUpsideDown; }

2. Cuando esté involucrado un UIBNavigationController (o un UIViewController), subclase el UINavigationController / UIViewController y sobreescribiendo las Interoperaciones soportadas de Interfaz.

- (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; }

Y

In buid summary supported orientations selected landscape right and landscape left.

Ahora el centro de juego está funcionando correctamente sin bloqueo.

Cuando el Game center está cargado, su orientación predeterminada es retrato. Para bloquearlo en modo horizontal, se añade una categoría.

@implementation GKMatchmakerViewController (LandscapeOnly) - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return ( interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } - (BOOL)shouldAutorotate { return NO; } @end

Está funcionando bien en iOS 6. Pero en iOS6 muestra un error.

Aplicación de terminación debido a la excepción no detectada ''UIApplicationInvalidInterfaceOrientation'', razón: ''Las orientaciones admitidas no tienen una orientación común con la aplicación, y elAutorotate debe devolver SÍ''

Por favor explique una solución.


Tengo que añadir 1 cosita. Luchando con ese estúpido problema unos 2 días. Si lo anterior no ayuda y tiene UINavigationController (y ya lo hizo subclase) necesita lo siguiente (en appDelegate):

[window setRootViewController:navigationController]; // use this // instead of [self.window addSubview:navigationController.view];

Gracias 2 http://grembe.wordpress.com/2012/09/19/here-is-what-i/