LoginButton
open class LoginButton : UIButton
Represents a login button which executes the login function when the user taps the button.
Note
To change the size of the button, use thebuttonSize
property instead of setting its frame or giving
it some size constraints.
-
Represents the size of the login button.
- small: The size of the login button is small.
- normal: The size of the login button is normal.
Declaration
Swift
public enum ButtonSize
-
Conforms to the
LoginButtonDelegate
protocol and implements the methods defined in the protocol to handle different login states.Declaration
Swift
public weak var delegate: LoginButtonDelegate?
-
Determines the view controller that presents the login view controller. If the value is
nil
, the most top view controller in the current view controller hierarchy will be used.Declaration
Swift
public weak var presentingViewController: UIViewController?
-
Represents a set of permissions. The default value is
[.profile]
.Declaration
Swift
public var permissions: Set<LoginPermission>
-
Represents the parameters used during login. The default value is
nil
.Declaration
Swift
public var parameters: LoginManager.Parameters
-
The size of the login button. The default value is
normal
.Declaration
Swift
public var buttonSize: ButtonSize { get set }
-
The text on the login button. Its value is “Log in with LINE” in the English environment and localized for different environments. The button will be resized if you change this property.
Declaration
Swift
public var buttonText: String? { get set }
-
Creates a predefined LINE Login button.
Declaration
Swift
public init()
-
Creates a predefined LINE Login button.
Declaration
Swift
public required init?(coder aDecoder: NSCoder)
-
Overrides the getter of the
intrinsicContentSize
property to support automatic layout.Declaration
Swift
override open var intrinsicContentSize: CGSize { get }
-
Executes the login action when the user taps the login button.
Declaration
Swift
@objc open func login()
-
Warning
Deprecated. UseLoginManager.Parameters
.Represents a set of options. The default value is empty.
Declaration
Swift
@available(*, deprecated, message: "Convert this value into a `LoginManager.Parameters` and use `parameters` instead.") public var options: LoginManagerOptions