NSPratik NSPratik - 1 year ago 93
iOS Question

Can I customize Login button of Twitter kit in iOS?

I have downloaded a Twitter kit framework and added code to login with Twitter. But, I don't want Login button look like that. I want a custom button for Login. Can I do that ? I only want to use this framework as this also leverages with iOS system account.

Provide me solutions or suggestions please.

Thanks in Advance !!!

Answer Source

As per the document :

Add the code in your button press :


[[Twitter sharedInstance] logInWithCompletion:^
            (TWTRSession *session, NSError *error) {
  if (session) {
      NSLog(@"signed in as %@", [session userName]);
  } else {
      NSLog(@"error: %@", [error localizedDescription]);


Twitter.sharedInstance().logInWithCompletion {
                (session, error) -> Void in
    if (session != nil) {
        println("signed in as \(session.userName)");
    } else {
        println("error: \(error.localizedDescription)");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download