# Modules.Applesignin.LoginButton
Built-in login button which can be added on view.
# 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
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
style :Number
Style for the authorization button.
This API can be assigned the following constants:
# type
type :Number
Type for the authorization button.
This API can be assigned the following constants: