sto usando il seguente metodo, e il suo funzionamento benissimo.
Utilizzare il seguente codice nella vista, in cui si utilizzerà fbgraph.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
[self leftOrienation];
}
else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
[self rightOrientation];
NSLog(@"right");
}
else
{
}
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
here i have initialized FbGraph as fbGraph.
-(void)leftOrienation
{
CGAffineTransform newTransform;
newTransform = CGAffineTransformMakeRotation(M_PI * 270/180.0f);
fbGraph.webView.transform = newTransform;
[fbGraph.webView setFrame:CGRectMake(0, 0, 768, 1024)];
}
-(void)rightOrientation
{
CGAffineTransform newTransform;
newTransform = CGAffineTransformMakeRotation(M_PI * 90/180.0f);
fbGraph.webView.transform = newTransform;
[fbGraph.webView setFrame:CGRectMake(0, 0, 768, 1024)];
}
fonte
2012-11-17 07:38:16
Chi sta visualizzando la casella di accesso? Un browser? Un applicazione? Come viene richiesta la visualizzazione della casella di accesso? – DMCS
Giusto per essere chiari, funziona in verticale o non funziona affatto? – Autonomy
sì, funziona nel ritratto – Gypsa