# Modules.Applesignin.LoginButton

Built-in login button which can be added on view.

Availability
1.0.0

# Examples

# Login button to signin

var AppleSignin = require('ti.applesignin');

var win = Ti.UI.createWindow({
    backgroundColor: '#fff'
});

var signInButton = AppleSignin.createLoginButton({
    type: AppleSignin.BUTTON_TYPE_SIGNIN,
    style: AppleSignin.BUTTON_STYLE_BLACK,
    top: 150,
    height: 50,
    width: 300,
    borderRadius: 10
});

signInButton.addEventListener('click', function () {
    AppleSignin.authorize({
        scopes: [AppleSignin.AUTHORIZATION_SCOPE_EMAIL, AppleSignin.AUTHORIZATION_SCOPE_FULLNAME]
    });
});

AppleSignin.addEventListener('login', function (e) {
    if (e.success === true) {
            alert('Login successfully');
        } else {
            alert('Login failed');
        }
});

win.add(signInButton);
win.open();

# Properties

# borderRadius

Availability
1.0.0
borderRadius :Number

The radius, in points, for the rounded corners on the Apple ID sign-in button.

Each corner is rounded using an arc of a circle. Values for each corner can be specified. For example, '20px 20px' will set both left and right corners to 20px. Specifying '20px 20px 20px 20px' will set top-left, top-right, bottom-right and bottom-left corners in that order.

Default: 0


# style

Availability
1.0.0
style :Number

Style for the authorization button.


# type

Availability
1.0.0
type :Number

Type for the authorization button.