如何更改Google Plus登录按钮的标题? [英] How to change title of Google Plus Sign in button?

查看:97
本文介绍了如何更改Google Plus登录按钮的标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找解决方案,但令我惊讶的是,还没有人问这个问题:

I was searching for solution but to my suprise nobody asked this question yet:

如何更改Google登录按钮的标题?

How to change title of Google Sign In button?

我正试图:

  1. setTitle:覆盖标题,但没有帮助.
  2. 在Google Plus框架目录中找到登录"字符串,但是...我的Finder找不到这样的字符串. 3.使用以下代码可更改Facebook登录按钮:

  1. override title by setTitle: but didn't help.
  2. find "Sign in" string in Google Plus framework directory but well... my Finder didn't find such string. 3.Use following code which works for changing Facebook Login button:

for (id obj in self.signInButtonGPP.subviews)
{
     if ([obj isKindOfClass:[UILabel class]])
     {  UILabel * label =  view;
        label.text = @"Google";
     }}

谢谢

推荐答案

按钮的资源包含在 GooglePlus.bundle 文件中.标签的值来自捆绑软件中的 GooglePlusPlatform.strings 文件.

The resources for the button are contained in the GooglePlus.bundle file. The value for the label is coming from the GooglePlusPlatform.strings file in the bundle.

您可以直接编辑登录键的值以使用自定义标题. (尽管这将是一个肮脏的解决方法,但您必须在所有语言环境中都使用它.)

You can directly edit the value of the Sign in key to have a custom title. (This would be a dirty fix though, you must do it for all the locales.)

在执行此操作时,请务必遵守 Google+登录按钮品牌指南.

And while doing that be sure to comply with the Google+ Sign-In button branding guidelines.

这篇关于如何更改Google Plus登录按钮的标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆