小编swa*_*nil的帖子

Google Plus iPhone API登录并分享,无需离开应用

我已将Google+ API集成到我的应用中,以便登录和分享帖子.问题是,一切都要求你离开应用程序然后回来(它使用URL方案).这不是预期的行为.我想知道是否有办法直接在我的应用程序中打开登录对话框,而不需要去safari.

我真的想避免在safari和我的app之间来回走动.

iphone objective-c ios google-plus

14
推荐指数
1
解决办法
651
查看次数

使用带有OAuth 2.0的Google API在iPhone中登录Gmail

我找到了Google提供的服务,可以访问Google APIs各种Google服务.我可以在iPhone中设置一个项目,并为iOS应用程序(通过OAuth2.0)和本机应用程序创建API访问.我想为我的iPhone应用程序使用本机API.它API给我电子邮件,全名,名字,姓氏,google_id,性别,dob,profile_image.如何在我的iPhone应用程序,任何样本应用程序,可用的代码段中使用这些?

请帮我.

这是我的代码:

-(void) loadGmail_Login
{
    NSString *keychainItemName = nil;
    if ([self shouldSaveInKeychain]) {
        keychainItemName = kKeychainItemName;
    }

    // For GTM applications, the scope is available as
    NSString *scope = @"http://www.google.com/m8/feeds/";

    // ### Important ###
    // GTMOAuthViewControllerTouch is not designed to be reused. Make a new
    // one each time you are going to show it.

    // Display the autentication view.
    GTMOAuthAuthentication *auth;
    auth = [GTMOAuthViewControllerTouch authForGoogleFromKeychainForName:kKeychainItemName];

    GTMOAuthViewControllerTouch *viewController = [[[GTMOAuthViewControllerTouch alloc]
                                                    initWithScope:scope
                                                    language:nil
                                                    appServiceName:keychainItemName …
Run Code Online (Sandbox Code Playgroud)

gmail oauth google-api ios

7
推荐指数
1
解决办法
6424
查看次数

应用程序重新输入前景时SDWebImage + WebP ImageView闪烁

我通过CocoaPods在我们的项目中面临SDWebImage + WebP集成的问题.我正在使用SDWebImage + WebP从我的服务器在UItableView中的集合列表中加载我的webp图像.

每次我重新进入前景或每次重新启动时,单元格中的imageView将从磁盘重新获取图像(意味着图像视图将为空白)并使用相同的图像重新加载UIImageview,即使数据在服务器上没有更改.

但是当我使用具有相同代码库的JPG格式时,它将按照我的预期工作,重新输入前景没有黑屏,它将显示缓存的图像.但它不适用于webp

我使用的代码:

[videoV.imageViewVideo sd_setImageWithURL:[NSURL URLWithString:imageUrl] placeholderImage:nil options:SDWebImageRefreshCached|SDWebImageRetryFailed ];
Run Code Online (Sandbox Code Playgroud)

任何帮助欣赏!

iphone ios webp sdwebimage

7
推荐指数
1
解决办法
204
查看次数

标签 统计

ios ×3

iphone ×2

gmail ×1

google-api ×1

google-plus ×1

oauth ×1

objective-c ×1

sdwebimage ×1

webp ×1