首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >FBGraph API不支持land模式

FBGraph API不支持land模式
EN

Stack Overflow用户
提问于 2011-09-26 19:09:44
回答 3查看 394关注 0票数 6

我正在开发一个iPad应用程序,其中登录是使用Facebbook图形完成API.My应用程序支持横向模式。我已经集成了facebook应用程序接口,但它不是在景观mode.Please建议我如何在景观模式下显示我的facebook登录视图。

任何建议都将不胜感激。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-10-04 17:06:24

如果你使用here最新的SDK,Facebook登录将在Safari或Facebook应用程序中打开,或者直接从iOS 6设置中获取。它不会在我们的应用程序中打开登录窗口,也不会有方向问题。

票数 1
EN

Stack Overflow用户

发布于 2012-11-01 14:54:10

改用facebook sdk:

New facebook SDK

票数 1
EN

Stack Overflow用户

发布于 2012-11-17 15:38:17

我正在使用下面的方法,它工作得很好。

在视图中使用以下代码,您将在其中使用fbgraph。

代码语言:javascript
运行
复制
    - (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)];

    }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7554176

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档