In October, we unveiled Digits, a simple and secure phone-based sign-in solution that’s free for both developers and users. Today we’re excited to release theming support, a new feature that lets you make Digits blend into your apps, on both iOS and Android.
We understand how crucial your app’s sign-in experience is to growing and retaining your user base. Digits can already be launched from any button anywhere within your app to optimize that experience. Now, with theming support, you can match Digits exactly to your app’s ambience so the Digits sign-in flow looks indistinguishable from your app. The look and feel of your background, call-to-action button and select text are all customizable.
Theming requires just a few lines of code, and Digits will do the rest. Take McDonald’s as an example. On Android, simply create a new theme with the desired background and accent colors:
#ff121314 #ffd7262e
Afterwards, just set the theme by passing it as parameter on the Digits authenticate method:
Digits.authenticate(callback,R.style.MyTheme);
On iOS, create a DGTAppearance object that specifies your colors, and either (a) set the button appearance property to that object (when using the built-in button DGTAuthenticateButton), or (b) pass it to the authenticateWithAppearance: method (when using a custom button). Here’s an example using the tap handler method of your custom button:
DGTAppearance *digitsAppearance = [[DGTAppearance alloc] init]; digitsAppearance.backgroundColor = [UIColor blackColor]; digitsAppearance.accentColor = [UIColor greenColor]; Digits *digits = [Digits sharedInstance]; [digits authenticateWithDigitsAppearance:digitsAppearance viewController:nil title:nil completion:^(DGTSession *session, NSError *error) { // Inspect session/error objects }];,
However your app looks, Digits will fit right in. If you’re interested in Digits, visit dev.twitter.com/fabric for Fabric and the Twitter Kit. If you already have Digits, see our docs for Android or iOS to learn more about theming.
Did someone say … cookies?
X and its partners use cookies to provide you with a better, safer and
faster service and to support our business. Some cookies are necessary to use
our services, improve our services, and make sure they work properly.
Show more about your choices.