我正在开发一个iPad应用程序,其中登录是使用Facebbook图形完成API.My应用程序支持横向模式。我已经集成了facebook应用程序接口,但它不是在景观mode.Please建议我如何在景观模式下显示我的facebook登录视图。
任何建议都将不胜感激。
发布于 2012-10-04 17:06:24
如果你使用here最新的SDK,Facebook登录将在Safari或Facebook应用程序中打开,或者直接从iOS 6设置中获取。它不会在我们的应用程序中打开登录窗口,也不会有方向问题。
发布于 2012-11-01 14:54:10
改用facebook sdk:
发布于 2012-11-17 15:38:17
我正在使用下面的方法,它工作得很好。
在视图中使用以下代码,您将在其中使用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)];
}
https://stackoverflow.com/questions/7554176
复制相似问题