title: IOS- Google sign in button
body: <p>in my app I have my google sign in button which works well but I have a problem clicking this button. It goes on only if I click on the button about 3 seconds. I would tap on the button and go directly to the permission page or to another activity. 
  Thank you in advance for your help.</p>
  
  <p><strong>AppDelegate:</strong></p>
  
  <pre><code>import GoogleSignIn
  
  class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate {
      func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {
          // Override point for customization after application launch.
          FIRApp.configure()
  
          GIDSignIn.sharedInstance().clientID = FIRApp.defaultApp()?.options.clientID
          GIDSignIn.sharedInstance().delegate = self
  
          return true
  
      }
  
      func application(application: UIApplication,
          openURL url: NSURL, options: [String: AnyObject]) -&gt; Bool {
              return GIDSignIn.sharedInstance().handleURL(url,
                  sourceApplication: options[UIApplicationOpenURLOptionsSourceApplicationKey] as? String,
                  annotation: options[UIApplicationOpenURLOptionsAnnotationKey])
      }
  
      func signIn(signIn: GIDSignIn!, didSignInForUser user: GIDGoogleUser!,
          withError error: NSError!) {
              if (error == nil) {
                  // Perform any operations on signed in user here.
                  let userId = user.userID // For client-side use only!
                  let idToken = user.authentication.idToken // Safe to send to the server
                  let fullName = user.profile.name
                  let givenName = user.profile.givenName
                  let familyName = user.profile.familyName
                  let email = user.profile.email
                  // ...
              } else {
                  print("\(error.localizedDescription)")
              }
      }
  
      func signIn(signIn: GIDSignIn!, didDisconnectWithUser user: GIDGoogleUser!,
          withError error: NSError!) {
              // Perform any operations when the user disconnects from app here.
              // ...
      }
  
  }
  </code></pre>
  
  <p><strong>Login:</strong></p>
  
  <pre><code>    import GoogleSignIn
  
      class Login: UIViewController,GIDSignInUIDelegate, GIDSignInDelegate {
          @IBOutlet weak var google_view: UIView!
          let login_button_google = GIDSignInButton(frame: CGRect(x: 0, y: 0, width: 100, height: 50))
  
          override func viewDidLoad() {
              super.viewDidLoad()
  
  hideKeyboard()
          GIDSignIn.sharedInstance().uiDelegate = self
          GIDSignIn.sharedInstance().delegate = self
          GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.login")
          GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.me")
  
          login_button_google.center = self.google_view.center
          self.view!.addSubview(login_button_google)
  
      }
  
      func signIn(signIn: GIDSignIn!, didSignInForUser user: GIDGoogleUser!,
          withError error: NSError!) {
  
          if (error == nil) {
              // Perform any operations on signed in user here.
              userId = user.userID // For client-side use only!
              idToken = user.authentication.idToken // Safe to send to the server
              fullName = user.profile.name
              email = user.profile.email
              performSegueWithIdentifier("loginToDoing", sender: nil)
  
          } else {
              print("\(error.localizedDescription)")
          }
      }
  }
  </code></pre>